Donald Trump, with a little help from Congress, will have broad presidential powers to crack down on "sanctuary cities" that protect undocumented immigrants from his planned roundup and deportation of millions who are in the country illegally.

In what could become a major conflict between the new president and local governments, the showdown likely will result in legal challenges testing how far the White House can go in dictating its priorities.

Trump will be armed with a range of powerful options, including federal lawsuits and the power to withhold hundreds of millions of dollars in grants that states and cities rely on.

"The Trump administration can largely get the results it is seeking and a real meaningful end to most of these sanctuary policies through a combination of carrots and sticks," said Jessica Vaughan, director of policy studies at the Center for Immigration Studies, who has advised the Trump transition team on its immigration enforcement options. "The point is not to go around whacking all these little cities and counties, it's to get them to do the right thing. And for the die-hards, to confront them."

Local communities are digging in for the fight. Chicago Mayor Rahm Emanuel created a task force to help undocumented immigrants and pledged $1 million for a legal defense fund. "Chicago always will be a sanctuary city," he said.

The term "sanctuary city" describes up to 300 communities that have a range of policies protecting the nation's 11 million undocumented immigrants from deportation.

Some cities — including San Francisco, Chicago and New York — proudly declare themselves sanctuaries and have enacted policies that prohibit municipal employees from turning over residents or information on them to the U.S. Immigration and Customs Enforcement (ICE).

Other cities more narrowly restrict police from inquiring about the immigration status of detained suspects. There also are cities that work with federal immigration authorities but refuse to hold suspects in jail solely so ICE agents can pick them up.

Beyond city governments, institutions that include churches and universities vow to fight federal efforts to round up undocumented immigrants on their grounds.

Here are the two most powerful weapons the Trump administration will have to fight back: