Gov. Roy Cooper of North Carolina, a Democrat, vetoed a bill on Wednesday that would have required sheriffs in the state to cooperate with U.S. Immigration and Customs Enforcement (ICE) agents seeking to obtain custody of illegal aliens for whom detainers have been issued.

House Bill 370, “An Act to Require Compliance With Immigration Detainers and Immigration Warrants” — mandating that sheriffs cooperate with ICE — passed the North Carolina State Senate in June and was brought to Cooper for his signature after it easily passed in the North Carolina House of Representatives on Tuesday. Republicans have a majority in both houses of the state’s legislature.

“If the administrator or other person in charge of the facility is unable to determine if [a newly incarcerated] prisoner is a legal resident or citizen of the United States or its territories, the administrator or other person in charge of the facility holding the prisoner, where possible, prisoner shall make a query of Immigration and Customs Enforcement of the United States Department of Homeland Security,” the bill states.

“When any person charged with a criminal offense is confined for any period in a county jail, local confinement facility, district confinement facility, satellite jail, or work release unit, and the administrator or other person in charge of the facility has been notified that Immigration and Customs Enforcement of the United States Department of Homeland Security has issued a detainer and administrative warrant that reasonably appears to be for the person in custody, the following shall apply,” the bill continues:

(1) Prior to the prisoner’s release, and after receipt of the detainer and administrative warrant … by the administrator or other person in charge of the facility, the prisoner shall be taken without unnecessary delay before a State judicial official who shall be provided with the detainer and administrative warrant. (2) The judicial official shall issue an order directing the prisoner be held in custody if the prisoner appearing before the judicial official is the same person subject to the detainer and administrative warrant. (3) Unless continued custody of the prisoner is required by other legal process, a prisoner held pursuant to an order issued under this subsection shall be released upon the first of the following conditions: a. The passage of 48 hours from receipt of the detainer and administrative warrant. b. Immigration and Customs Enforcement of the United States Department of Homeland Security takes custody of the prisoner. c. The detainer is rescinded by Immigration and Customs Enforcement of the United States Department of Homeland Security.

“This legislation is simply about scoring partisan political points and using fear to divide North Carolina,” Cooper said in a statement released by his office on Wednesday explaining his veto:

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.

“Republicans led by House Speaker Tim Moore (R-Kings Mountain) blasted Cooper at a news conference held minutes after the veto was announced, saying Cooper turned his back on the public and victims of crime,” the Associated Press reported:

The overwhelming majority of North Carolinians “believe that law enforcement ought to work together,” said Rep. Destin Hall (R-Caldwell), a chief bill sponsor. “They believe that our sheriffs ought to be working with federal law enforcement officials and by his veto today, Gov. Cooper has signaled that he wants to be a sanctuary governor.” “The only sheriffs who have opposed it are the ones that are actually ignoring these ICE detainers,” Moore said. “They’re the most left of the leftists at this point.” As they have during legislative debate, Republicans cited situations in Mecklenburg County — in and around Charlotte — where violent suspects who were subjects of detainers had been released from jail.

Though Republicans criticized Cooper’s veto, the Raleigh News and Observer reported on Wednesday, “they don’t have the numbers unless Democrats break ranks. So far, Democrats have been united against the latest version of the bill.”