Donald Trump and mayors of sanctuary cities are engaging in a high-stakes game of chicken as the president-elect vows to withhold billions in federal funds from communities that offer refuge to illegal immigrants.

It is estimated that more than 200 cities including New York City, Chicago and Los Angeles have publicly stated that they will not provide full cooperation to Immigration and Customs Enforcement agents. New York could lose around $10 billion if Trump follows through on his August campaign pledge to "block funding for sanctuary cities. We block the funding. No more funding."

The battle lines sharpened after Trump announced his nomination of an immigration hard-liner, Sen. Jeff Sessions of Alabama, for attorney general.

San Francisco Mayor Ed Lee is undaunted. "Being a sanctuary city is in our DNA," Lee said in a tweet. "San Francisco will never be anything other than a sanctuary city."

The issue is especially complicated because the term "sanctuary city" lacks an agreed-upon definition since some communities cooperate with Immigration and Customs Enforcement more than others.

It's hard to know what types of funding could be affected because some federal grants are administered through state agencies, said Audrey Singer, a senior fellow with the Urban Institute in Washington, D.C.

"I do think it's a looming issue that sets up local governments in opposition with the incoming administration," Singer told AMI Newswire. Many sanctuary cities now cooperate with federal authorities on removing immigrants who are criminals, so it's possible that the federal government could establish a minimum cooperation level for cities, she said.

The mayor of Somerville, Massachusetts, sees the term "sanctuary city" as meaning that local police and other municipal agencies do not perform routine immigration checks on residents. But the city of nearly 76,000 does cooperate with federal immigration authorities when undocumented residents commit serious crimes, acts of violence or felonies.

"Sanctuary means we don't hand over persons for deportation for civil offenses like driving with a broken tail light," said Mayor Joseph Curtatone in an open letter to residents last week. "That breaks up families and fuels a broken immigration system."

Somerville, which has been a sanctuary city since 1987, receives about $6 million annual in federal funds for programs such as special education, homeland security and school lunches, Curtatone said. That represents about 3 percent of the city's annual budget.

"If we lose this funding, we will tighten our belts, but we will not sell our community values short," he said.

Curtatone's comments parallel those of New York City Mayor Bill de Blasio. At a news conference after the presidential vote, de Blasio advised Trump not to expect local police to be extensions of federal immigration police.

"If undocumented people feel that local police forces are in effect deportation forces … it will actually hurt the work of law enforcement and make it harder to keep our cities safe," de Blasio said.

Even so, New York City laws outline dozens of categories of crimes that will lead city officials to cooperate with Immigration and Customs Enforcement, the mayor said.

De Blasio also doesn't believe Trump can cut federal funding to a city across the board.

"It has to be very specific to the matter at hand," he said. "If we disagree in one particular policy area, you know there may be opportunities for the federal government to say, 'Well, we're not going to fund you in that policy area,' but not across the board."

Other cities also vowed to stick to their sanctuary city status.

"To be clear about what Chicago is, it always will be a sanctuary city," said Chicago Mayor Rahm Emanuel.

He also promised to continue to welcome undocumented city residents into after-school activities, summer jobs programs and a program providing a free community college education for those who maintain a "B" average in high school.

In Los Angeles, home to an estimated 500,000 undocumented immigrants, the police chief stands behind the idea that successful policing requires maintaining the cooperation of the majority of the city's residents. Taking on the role of immigration police would tear that cooperation apart, Los Angeles Police Chief Charlie Beck said in a news conference.

The Trump administration may find an avenue to pressure sanctuary cities in a July Justice Department decision to withhold certain grant funding from cities or other jurisdictions that limit officials from exchanging information with federal immigration agents. The decision involved Byrne Justice Assistance Grants, the department's primary initiative for crime fighting, and the State Criminal Alien Assistance Program, which reimburses local governments for the costs of undocumented immigrants.

Another sticking point is how cities deal with immigration detainers, which have been used by Immigration and Customs Enforcement to advise local law enforcement agencies of its interest in certain immigrants already in those agencies' custody. A federal court found that state and local agencies are not bound to obey such detainers, which don't establish probable cause. In turn, local agencies may be held liable for damages for unlawful incarceration when obeying a detainer request.

Trump may also find resistance to withholding federal funds to sanctuary cities from police organizations that otherwise agree with his opposition to such city policies. The National Association of Police Organizations, which supports laws to eliminate sanctuary cities, does not support cutting the purse strings unilaterally.

"While NAPO supports efforts in Congress to eliminate sanctuary jurisdictions, which pose real threats to the American people, we do not believe that law enforcement should be punished for the decisions of elected officials," the organization said in a prepared statement.

The federal government should focus penalties on community block grants, which don't directly affect law enforcement's ability to fight crime, said NAPO.