Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

At least two of the four major U.S. cities targeted by the Justice Department over their "sanctuary city" policies are pushing back, arguing they've done nothing wrong, letters obtained Friday by NBC News show.

“The letter we submitted to DOJ reiterates that the city’s laws and policies exist in harmony with federal law and bedrock principles of local sovereignty and control,” Zachary W. Carter, corporation counsel for New York, said in a statement.

Earlier this month, Attorney General Jeff Sessions told the four cities — New York, Philadelphia, Chicago and New Orleans — as well as Cook County, Illinois, which includes Chicago, that they appeared to be in violation of a federal statute that requires jurisdictions to comply with federal immigration officials and help to deport suspected undocumented immigrants held in local jails.

The DOJ gave the cities an Oct. 27 deadline to prove compliance, or lose a critical federal grant that supports law enforcement and prosecution, among other crime-fighting areas.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

New York and Philadelphia balked at the request.

In its letter, New York said the DOJ is mischaracterizing the statute as well as the city’s policies and laws while attempting to “impose new certification requirements that have no basis in law.”

“As the city demonstrated ... these laws and policies build civic trust and encourage the public to interact with local government. These policies also protect all residents’ confidential and sensitive information from disclosure,” Carter said, adding the city is "deeply committed to preserving" the funding for law enforcement.

Mayor Bill de Blasio speaks at the mayoral debate at Symphony Space in New York on Oct. 10. Jefferson Siegel / Pool via AP

Philadelphia also disputed the DOJ's finding that it could be in violation of the statue. In its letter Friday, City Solicitor Sozi Pedro Tulante said the city's laws and policies do not limit police or city workers from asking about immigration status, but rather make clear that all individuals may seek out city services regardless of status.

Tulante also noted that the city plans to continue the lawsuit it filed against Sessions in August over the administration’s sanctuary city crackdown. Philadelphia Mayor Jim Kenney, a Democrat, called the crackdown “purely political” at the time.

Chicago and New Orleans did not respond to a request for comment. Neither did the DOJ about the response from New York and Philadelphia.

President Donald Trump issued an executive order in January aimed at cutting off funding from sanctuary cities. However, the order has been in legal limbo after a judge issued a nationwide injunction in April.

Sessions has ratcheted up the administration's tough talk on illegal immigration and sanctuary cities, claiming they protect “criminal aliens” at the expense of “law-abiding citizens and of the rule of law."