In the face of protests, lawsuits, internal grumbling, an international backlash and a partial climb-down, the Trump administration invoked Quebec City's mosque attack to defend its travel ban on seven majority-Muslim countries.

The controversial policy faced attacks on multiple fronts, capped late Monday by surprise announcements: the acting attorney general appointed by former president Barack Obama declared she wouldn't defend the order, and was fired.

Amid that barrage, the White House mounted an unanticipated line of defence.

Press secretary Sean Spicer began his daily briefing with news that the president had offered Prime Minister Justin Trudeau his country's condolences, prayers and any law-enforcement help Canada might need.

Trump condemns Quebec mosque attack1:04

Then came a political point — one that glossed over the fact that in the case of the Quebec mosque massacre, the victims were Muslims, and they were allegedly shot and killed by a reported fan of President Donald Trump.

"It's a terrible reminder of why we must remain vigilant. And why the president is taking steps to be proactive, not reactive," Spicer said Monday.

He later made clear he was, in fact, making the link to the executive order on travel, which specifically targets travel from primarily Muslim countries in the Middle East.

Asked about the executive order, he went back to his earlier remark: "As I said in the statement, the president is going to be very proactive in protecting this country. ... That's the key point in this — how do we get ahead of threats? How do we keep America ahead of the curve, when it comes to people who want to do us harm?"

The suspect in the mosque shooting, Alexandre Bissonnette, is not from the countries affected by the travel ban and appears to be Canadian-born and raised.

Trump's chat with Trudeau came after some Canadian fears were soothed over a chaotic weekend. With lawsuits flying, and protesters clogging airports, the U.S. government initially stated that the travel restrictions would apply to dual citizens.

That potentially included 35,000 Canadians with dual citizenship with the affected countries — some of whom may work, live and have families in the U.S. The U.S. government is now signalling that the policy would not apply to Canadian dual citizens.

It's not the only change. While the order would presumably still affect work visas, the government now says it won't apply to permanent U.S. residents with green cards. A third possible adjustment involves exemptions for individuals who worked for the U.S. military. Defence Secretary James Mattis is drawing up a list.

Acting attorney general fired

The changes come amid reports of behind-the-scenes tussling within Trump's team. Administration members fumed to friendly media Monday about the haphazard manner in which this major policy was designed, released and publicly communicated.

Morning Joe host Joe Scarborough said he spoke to the president over the weekend as well as senior aides. He said foreign-policy figures in Trump's administration felt blindsided by the announcement, and blamed younger political staff.

The former lawmaker and MSNBC host singled out the 31-year-old Stephen Miller, an immigration hawk, policy adviser and speechwriter who would warm up the crowds with speeches before Trump at campaign rallies.

Canada's parliamentarians are scheduled to discuss the issue Tuesday night. The government says it has received assurances from Michael Flynn, Trump's national security adviser, that despite earlier statements from the U.S. government, Canadian citizens won't be affected.

The order faces uncertainty on other fronts.

Acting U.S. Attorney General Sally Yates said late Monday that she doubted the executive order was lawful. The Obama appointee, who was to be replaced once Trump's new attorney general got confirmed by the Senate, said in a letter: "For as long as I am the Acting Attorney General, the Department of Justice will not present arguments in defence of the Executive Order, unless and until I become convinced that it is appropriate to do so."

She was fired later in the evening.

While referring to State Department officials critical of the measure earlier in the day, Spicer said: "I think that they should either get with the program or they can go. This is about the safety of America and there's a reason a majority of Americans agree with the president."

With files from CBC News