Voters in Boston headed to the polls Tuesday for a preliminary mayoral contest as the city confronts a fresh federal immigration enforcement effort and an ongoing legal fight with the Justice Department.

The Department of Homeland Security announced that U.S. Immigration and Customs Enforcement launched "Patriot 2.0" on Sunday to target what the agency described as "the worst of the worst criminal illegal aliens living in the state of Massachusetts," following a May operation it identified as Operation Patriot. The move came as the Justice Department has sued Boston city officials, including Mayor Michelle Wu, alleging that local policies interfere with federal immigration enforcement.

Wu, a Democrat seeking re-election to a second four-year term, has pushed back against the federal effort, saying the administration is wrong on both legal and public-safety grounds. "They are wrong on the law, and they are wrong on safety," Wu said, adding that Boston would continue to uphold the state-level Boston Trust Act and protect the separation between local and federal responsibilities on immigration enforcement.

The Boston Trust Act, passed by the state, limits local police from handing people over to ICE without a criminal warrant. Wu has also criticized ICE tactics, saying the city has received reports of agents taking parents while they were dropping children off at school and accusing ICE of failing to provide information about its activities in Boston.

In a statement accompanying the Patriot 2.0 announcement, ICE said sanctuary policies "not only attract and harbor criminals but also place these public safety threats above the interests of law-abiding American citizens," and said the agency was arresting people it described as sex offenders, pedophiles, murderers, drug dealers and gang members who had been released by local authorities.

The enforcement action and the lawsuit add a national spotlight to the mayoral contest in Massachusetts' most populous city, where polls show Wu as the heavy favorite in Tuesday’s preliminary vote. The preliminary round will narrow the field to two candidates for the November general election in a city that leans left.

Wu faces three challengers in the preliminary election. Philanthropist Josh Kraft, the son of New England Patriots owner Robert Kraft, is widely expected to be among the top two vote-getters and to advance to the general election alongside Wu, according to campaign analysts and public polling.

Local leaders and advocates have framed the conflict as a test of sanctuary policies and local control over public safety. Federal officials say their operations are focused on noncitizens convicted of serious crimes; city officials and immigrant advocates say broad enforcement sweeps risk community trust in law enforcement and public safety.

The preliminary election will determine which two candidates appear on the November ballot, but the legal and political clash between Boston and federal authorities is likely to continue regardless of the vote outcome. The Justice Department’s lawsuit and ICE’s stated enforcement priorities set the stage for further court challenges and political debate about the balance between local sanctuary measures and federal immigration enforcement.

Results from the preliminary were expected to narrow the race later Tuesday, with the general election scheduled for November when the final two candidates will compete for a four-year term as mayor.