RALEIGH, N.C. (WNCN) — Gov. Roy Cooper on Wednesday vetoed legislation that would have required sheriff’s office’s to cooperate with Immigration and Customs Enforcement when it comes to immigration detainers.

House Bill 370, known as “An Act to Require Compliance with Immigration Detainers and Administrative Warrants,” passed 62-53 in the State House on Tuesday afternoon. The bill was then sent to Cooper for his signature.

In a memo accompanying his veto, Cooper wrote, “As the former top law enforcement officer of our state, I know that current law allows the state to jail and prosecute dangerous criminals regardless of immigration status.”

Cooper served as attorney general before being elected governor.

The bill requires that law enforcement check everyone they arrest in the federal immigration database and if flagged, hold them on a detainer for up to 48 hours.

Republican legislators had planned to hold a press conference Wednesday afternoon to urge Cooper to sign the bill. They received his veto message minutes before that.

“This is probably one of the most disturbing vetoes since I have served that this governor has passed down,” said Rep. Brenden Jones (R-Columbus/Robeson).

Rep. Destin Hall (R-Caldwell), who is a primary sponsor of the bill, released a statement in the wake of the veto.

“Today we found out North Carolina has a sanctuary Governor,” Hall said, “as Governor Cooper has vetoed House Bill 370 that simply would have required sheriffs to honor ICE detainers, something almost every sheriff in this state is already doing.”

The bill is a response to newly elected sheriffs, including in Wake and Durham counties, who vowed not to cooperate with ICE.

Republicans who sponsored the bill brought up a recent case in Mecklenburg County involving Oscar Pacheco-Leonardo, who was in the country illegally when he was arrested for first-degree rape. He was released from jail after posting bond, which had been set at $100,000. ICE said Sheriff Garry McFadden did not honor a request to hold that man or inform ICE he had been released.

McFadden said the man got released after “fulfilling his court-ordered terms and conditions of release,” which included paying his bond.

Rep. Marcia Morey (D-Durham) said the issue in that case could have been that the bond was set too low, and that it would be unconstitutional for sheriffs to hold suspects beyond what a court has required.

“This is unnecessary. It is draconian and will affect and rip apart families across this state,” she said.

On Wednesday, Cooper released this statement after announcing that he vetoed the bill:

This legislation is simply about scoring partisan political points and using fear to divide North Carolina. As the former top law enforcement officer of our state, I know that current law allows the state to jail and prosecute dangerous criminals regardless of immigration status. This bill, in addition to being unconstitutional, weakens law enforcement in North Carolina by mandating sheriffs to do the job of federal agents, using local resources that could hurt their ability to protect their counties. Finally, to elevate their partisan political pandering, the legislature has made a sheriff’s violation of this new immigration duty as the only specifically named duty violation that can result in a sheriff’s removal from office.”