KEITH BEDFORD/GLOBE STAFF
Boston Mayor Martin J. Walsh spoke at a protest Sunday in Copley Square against President Trump’s immigration order.
The past 12 days have been a whirl for Mayor Martin J. Walsh. Within hours of President Trump’s inauguration, he appeared with tens of thousands of protesters on Boston Common. When Trump threatened to slash funding to cities that refuse to aid federal deportation efforts, the mayor offered up his City Hall office as shelter to undocumented immigrants.
And last weekend, amid a flurry of appearances on national television networks, Walsh was at protests at Logan Airport and Copley Square, lambasting Trump’s travel restrictions on refugees and immigrants that spiraled into chaos, tears, and lawsuits.
This was Marty in his moment, taking on a somewhat unexpected political foe — not in Boston, but hundreds of miles away in the White House. His elevation to the national stage has, some say, raised questions about Walsh’s own record on immigration record — but it also overshadowed a mayoral challenge from City Councilor Tito Jackson.
Michael McCormack, a Boston lawyer and former city councilor, said Trump is taking up all the oxygen in this year’s burgeoning mayoral race. The president is the perfect foil, McCormack said, and the mayor is taking advantage of it.
Walsh, in an interview, said he is not thinking of politics — least of all this year’s mayor’s race — in voicing his outrage over what he sees as Trump’s questionable policies.
“It’s personal because I’m the mayor of Boston, and over the last 20 years I’ve represented people who come from different nationalities, different backgrounds, [people who] speak different languages,’’ said Walsh, the son of Irish immigrant parents.
Jackson — who also participated in the women’s march the day after Trump’s inauguration and protests at Logan Airport, and took to the stage to rally demonstrators in Copley Square — appeared not to be bothered that Walsh is in the national spotlight.
“That’s par for the course,’’ Jackson said. “I know that I have a message in uplifting all of Boston.”
He said he would continue to wage a vigorous campaign in his quest to become the city’s next mayor. He added that advocacy for immigrants and women’s rights is not political but doing what is right and standing up for justice — something he said he has been doing all along.
“If the mayor would like to run against Donald Trump, that’s fine,’’ Jackson added. “I will be running to uplift the people of Boston to deal with the issues that they face — [such as advocating for] jobs, a world-class education, affordable housing, and safe neighborhoods.”
On the issue of immigration, Walsh has pledged to use all of his powers “within lawful means” to protect all Boston residents — even if that means using City Hall itself as a last resort.
But details about how much of the city’s resources will go to those efforts remain unclear — in part, a Walsh’s spokeswoman said, because the true impact of Trump’s order is murky.
Immigration advocates, while supportive of the mayor’s salvos, have said the city has been slow to act on many of their key issues, including creating a policy against the establishment of databases with the names of Muslims and other immigrants and offering municipal identification for people who can’t legally get a driver’s license. The city recently announced it is seeking bids to “study the feasibility” of having the ID cards. New York began offering the cards in 2015.
Patricia Montes, executive director of Centro Presente, an immigrant rights organization based in East Boston, said Walsh had been slow on immigration, but the city has picked up the pace recently through investments in groups like hers. She said she is proud the mayor is standing up to Trump.
“I’m glad that he’s doing this,’’ she said. “I hope he’s doing it because he really cares about immigrants and not because he’s running again.”
After the presidential election, Walsh, who backed Hillary Clinton, had comforted his staff and urged supporters to give Trump a chance. But after the whirl of last week’s presidential orders, Walsh said felt he had no choice but to take on the president.
“For six weeks, I was quiet,’’ Walsh said, referring to the days after the election. “I said . . . let’s see what the administration does. I still would like to give him a chance, but the actions of the last week were very difficult for me as a mayor of a major city. I can’t sit idly by and let him do . . . damage’’ to the country.
Walsh recalled that on the day of women’s march in Boston, as he stood on the stage at Boston Common looking at the sea of supporters in pink hats and hoisting signs that carried notes of their worst fears, he was overcome.
“It was incredible,’’ he said. “Everyone was there for a different issue, but everyone was there for the same reason.”
James O’Toole, a Boston College professor who studies local political history, said Walsh’s big national moment is unusual for a first-term mayor, who normally is consumed by the nuts-and-bolts issues of running a city and getting reelected.
“It’s a little like stepping into some new territory for him,’’ O’Toole said. “That may be a measure of his confidence in how well he is doing for this city. He’s certainly staked out what is an unusual role.”
O’Toole recalled a famous 1970s dispute between President Ford and Mayor Abraham Beame, who was seeking federal relief for his cash-strapped New York City. Ford vowed to veto any bill calling for a federal bailout of New York, instead proposing legislation that would hasten the city’s bankruptcy. A New York Daily News headline captured Ford’s disdain: “Ford to City: Drop Dead.’’
So far, Trump has not responded specifically to any of Walsh’s recent criticism of the president’s policies. During the campaign, Trump spared no insults for the mayor, calling Walsh in one instance a clown and criticizing the city’s failed Olympics bid.
Walsh said that when it comes to immigration and other social issues he will not back down.
“I know I am a first-term mayor, but I’ve been in this job now for the past three years,’’ Walsh said. “We still are very involved in the nuts and bolts issues. But this is about the future of this country.”