GARDEN CITY, N.Y. -President Donald Trump endorsed Nassau County Executive Bruce Blakeman's campaign for governor on Friday, using an afternoon rally at the county police academy to accuse Gov. Kathy Hochul and other New York Democrats of being soft on crime, The Associated Press reported.

Trump appeared at the David Mack Center for Training and Intelligence alongside senior Justice Department officials, who announced new crime statistics and criticized New York's recently enacted immigration law. Speaking with rows of uniformed cadets behind him, the president linked sanctuary policies to high-profile crimes and attacked Hochul, New York City Mayor Zohran Mamdani and other candidates backed by the Democratic Socialists of America. Blakeman shook the president's hand onstage and thanked him.

The endorsement landed hours after Hochul and Attorney General Letitia James issued a joint statement pressing local police agencies to sever their formal partnerships with Immigration and Customs Enforcement. Of the 12 agencies notified that they hold 287(g) agreements with the federal government, five have said they intend to comply with state law, the officials said. Seven others, including the Nassau County Sheriff's Office and Police Department, were given 11 days to unwind their agreements.

Local police should concentrate on keeping their communities safe, Hochul and James said, adding that New York passed the laws, intends to enforce them, and will keep standing up to what they described as federal overreach.

The measure at the center of the dispute, the Local Cops, Local Crimes Act, bars state and local law enforcement from assisting federal civil immigration enforcement and prohibits ICE agents from wearing masks during operations. Hochul signed it May 27. The state's Office of Immigrant Trust sent letters last month giving 12 counties until Aug. 25 to revoke their 287(g) agreements and to stop allowing local jails to hold people suspected of immigration violations.

Blakeman signed Nassau's agreement with the Department of Homeland Security earlier this year, allowing county officers to question people about immigration status and detain suspects, and permitting some to act as deputized ICE agents. He has called the state law dangerous and vowed to challenge it in court. The Justice Department has separately sued New York to block the statute, arguing that it unconstitutionally interferes with federal immigration enforcement.

The confrontation has pushed immigration to the center of a governor's race that is tightening with less than three months until Election Day. Hochul has pointed to increased state funding for law enforcement, including new information-sharing centers, while Blakeman has campaigned on the administration's border record.

New York City Police Commissioner Jessica Tisch has said the law does not disturb the department's work with federal agencies on terrorism, gun and gang cases, and that such cooperation will continue.