"We're not prepared to compromise on this and we believe that we stand on very firm legal and constitutional grounds," Wheeler said.
The tension between cities and President Trump over immigration policy reached a critical point on Wednesday as Trump, for the first time while in office, reiterated threats to pull federal funding if the cities won't comply with his administration's deportation plans. Trump also said in an ABC interview that he would start to build the border wall with Mexico which he promised on the campaign trail as soon as physically possible, within months.
The cost to cities could be steep.
On the line in a small city like Somerville, Massachusetts is $6 million in federal funding. In San Francisco, the federal funding is $1.2 billion, and in Seattle nearly $80 million, according to information provided by the cities to CNBC.
Most of the federal funding Trump has threatened to cut goes to urban programs that support a variety of causes, Wheeler said.
"Look at what those federal dollars in Portland are going for. They're largely going to help indigent populations, people who are lower income, people on disabilities, and school kids. I can't believe that at the end of the day Republicans are actually going to plant that flag in the ground," the Portland mayor said.
Many cities have vowed to maintain their sanctuary city status, no matter what measures the Trump administration takes. Mayors of Los Angeles, New York and Chicago have been among those voicing opposition to Trump's immigration plans since the day after he was elected.
"Sanctuary cities often see immigrants as the key to prosperity. They see immigration as the wind in the sails of the city," Juliet Stumpf, Robert E. Jones Professor of Advocacy and Ethics at Lewis and Clark Law School, told CNBC's Aditi Roy.
U.S. immigrants made up 13 percent of the population as of 2014, but contributed 14.7 percent of wages and salaries in the years between 2009 to 2011, according to the Economic Policy Institute.
From 2010 to 2014, Mexico led in countries with the largest unauthorized immigrant populations in the U.S. at 6.1 million people. Other countries with substantial unauthorized immigrant populations in the U.S. are: Guatemala (723,000), El Salvador (465,000), Honduras (337,000), China (268,000), India (267,000), South Korea (198,000), Philippines (188,000), Ecuador (143,000), Colombia (135,000), and Vietnam (118,000).
There may be legal room for pushing back against the Trump White House.
"There is no legal definition of a sanctuary city," Stumpf, said. "There isn't a body of law that governs sanctuary cities." She added, "The pathway to cutting federal funding to sanctuary cities is pretty cloudy."
Stumpf cited the risk of violating Fourth Amendment right of the "the people to be secure in their persons, houses, papers, and effects, against unreasonable searches and seizures" which has been tested in the past and can result in a city being held liable for damages.
Wheeler cited the 10th Amendment which gives local jurisdictions the right not to enforce federal mandates. "We're standing on strong legal ground here in the state of Oregon and there have also been federal court rulings here that back up our ability to be a sanctuary state."
Trump said in his first post-election interview with "60 Minutes" that he would deport unauthorized immigrants who have committed crimes, or around 820,000 of the 11 million unauthorized people currently in the U.S.
A 2013 Pew Research report shows that the crime rate among first-generation immigrants is significantly lower than the overall rate, though the rate of crime among second generation immigrants is nearly equal to that of native-born. In a 2015 report, Pew found that 72 percent of Americans — including 80 percent of Democrats, 76 percent of independents and 56 percent of Republicans – say undocumented immigrants, if they meet certain requirements, should be allowed to stay in the U.S.
"We are not harboring criminals. If somebody commits a crime ... they'll still be prosecuted here for those crimes," Portland's mayor Wheeler said. "The sanctuary status simply means that if you're being held in one of our local facilities and ... all of the charges are dropped, we're not going to expend local resources simply for the purpose of enforcing federal immigration status. If the federal government wants to expend those resources, they still can."
Pew has found that 59 percent of voters who backed Trump strongly associate undocumented immigrants with serious crimes, and a further 42 percent of those who support him less strongly, share that view. Fifty percent of Trump supporters believe undocumented immigrants "are more likely than American citizens to commit serious crimes, versus 43 percent who say they are not.
One of the unintended consequences of police involvement in immigration enforcement is that 44 percent to 45 percent of Latinos, regardless of immigration status, reported they were less likely to contact police if they were victims of crime or had information about crime due to fear that they would be asked about their immigration status. These numbers rise to 70 percent for all undocumented immigrants.
"If immigrants in the city can't trust the police, then they won't go to the police if they're victims of crime or witnesses to crime — and that is actually going to be detrimental to the safety of the community, because the police depend on the eyes and the ears of the community," Stumpf said. "To intermingle the police and the federal immigration authorities creates a lack of trust in the immigrant communities. It goes against the project of inclusivity in those cities."
—CNBC's Aditi Roy contributed to this report.