On Jan. 18, President Barack Obama told reporters in his final news conference that he would comment on his successor’s actions only at “certain moments where I think our core values may be at stake.”

He managed to stay quiet for less than two weeks.

Obama, who is still on vacation with his family after leaving office this month, issued a statement through his spokesman Monday encouraging Americans to publicly protest President Trump’s move to ban citizens from seven majority-Muslim countries — as well as refugees from across the globe — from entering the United States.

He also contested Trump’s claim that Friday’s executive order was based in part on decisions made during his administration, including identifying the same seven countries as harboring terrorism threats and slowing the processing of visas for Iraqis after evidence surfaced that two Iraqis seeking resettlement had been linked to terrorist activity in their homeland.

“With regard to comparisons to President Obama’s foreign policy decisions, as we’ve heard before, the President fundamentally disagrees with the notion of discriminating against individuals because of their faith or religion,” Obama spokesman Kevin Lewis said in a statement.

President Barack Obama meets with President-elect Donald Trump in the Oval Office on Nov. 10. (Pablo Martinez Monsivais/AP)

[Obama rejects comparison between Trump’s immigration policy and his own, encourages protests]

Obama’s decision to speak out — after pledging to do so in rare instances — underscores the predicament he and many of his top advisers find themselves in just days after leaving the White House. While the president repeatedly emphasized the need to ensure a smooth transition and not interfere with the workings of the new administration, the adoption of a policy antithetical to the values he espoused while in office caused him to break his silence.

While some former presidents eventually came to criticize their successors — Theodore Roosevelt broke with William Howard Taft, whom he worked to get elected in 1908 and then ran against four years later — they have generally sought to stay quiet.

Even Roosevelt told Taft after returning from a vacation overseas that while some progressives were disappointed with the new administration’s direction, “I will make no speeches or say anything for two months. But I will keep my mind open . . . as I keep my mouth shut.”

“I don’t think it’s very common at all for an ex-president to be commenting on the performance of his successor,” presidential historian Robert Dallek said. “This current incumbent is so out of sync with what the normal behavior of a president is that it calls for ex-presidents to respond.”

1 of 23 Full Screen Autoplay Close Skip Ad × Protest at New York’s JFK airport against Trump’s order halting refu­gee admissions View Photos Entry to the United States is being refused to legal residents, including green-card holders, from seven mostly Muslim countries who were abroad when the executive order was signed Friday by the president, and some travelers were detained at U.S. airports. Caption Entry to the United States is being refused to legal residents, including green-card holders, from seven mostly Muslim countries who were abroad when the executive order was signed Friday by the president. Jan. 28, 2017 People protest the Muslim immigration ban at John F. Kennedy International Airport in New York. President Trump signed an executive order that halted refugees and residents from certain predominantly Muslim countries from entering the United States. Stephanie Keith/Getty Images Buy Photo Wait 1 second to continue.

During his last news conference, Obama sketched out the criteria for what would prompt him to speak out as a private citizen. He said threats to some of the key ideas he championed — including tolerance for minorities, immigrants and political dissent, as well as the need for broad voter participation among Americans — could prompt him to weigh into the public discourse.

“I put in that category if I saw systematic discrimination being ratified in some fashion. I put in that category explicit or functional obstacles to people being able to vote, to exercise their franchise,” he said. “I’d put in that category institutional efforts to silence dissent or the press. And for me, at least, I would put in that category efforts to round up kids who have grown up here, and for all practical purposes are American kids, and send them someplace else, when they love this country.”

Several journalists put in requests for comment to Obama’s office in the wake of the executive order, Lewis said, and while the former president is trying to take time off with his family, “he’s reading the news like everyone else.”

Presidential historian Douglas Brinkley — who discussed Obama’s post-presidential role with him — said the former president had initially hoped to avoid commenting on the political issues of the day.

“Donald Trump’s thrown a monkey wrench into those plans,” Brinkley said, adding that while “he’s not going to be getting into the nitty-gritty of the policy fights” or serving as “a Democratic Party operative,” he’s “going to have to stay very engaged” on a few key issues.

“He’ll be a voice of dissent, but done in a calm and reassuring way,” said Brinkley, a Rice University history professor. “There was no way Barack Obama could have stayed silent on this immigration ban.”

The very structure of Obama’s post-presidential office — which includes a few of his top White House communications aides — highlights the extent to which he is already positioning himself to engage in political advocacy.

Obama — who in his farewell address called on supporters to engage in political organizing to advance progressive goals — praised the idea Monday of Americans taking part in peaceful protests in the wake of the executive order.

“President Obama is heartened by the level of engagement taking place in communities around the country,” Lewis said. “Citizens exercising their Constitutional right to assemble, organize and have their voices heard by their elected officials is exactly what we expect to see when American values are at stake.”

[President Obama’s farewell speech transcript, annotated]

Over the past year, Obama and several of his closest allies expressed concern that he had been unable to transfer the enthusiasm he generated onto either another political candidate or the Democratic Party more broadly. In recent weeks, however, liberals have managed to organize major protests on issues including women’s rights and support for immigrants and those seeking asylum.

“What is notable about the grass-roots response to Trump . . . is that it is exactly the response that President Obama called for in his farewell address,” former White House senior adviser Dan Pfeiffer wrote in an email.

While Obama expressed his opposition to Trump’s latest policy announcement in fairly diplomatic terms, other members of his former White House team have been more forceful in expressing their dismay.

Susan E. Rice, who served as Obama’s national security adviser during his second term, could not contain her outrage at the idea that Trump gave his chief strategist, Stephen K. Bannon, a regular seat on the National Security Council’s principals committee and that the director of national intelligence and the chairman of the Joint Chiefs of Staff would sit in only as needed.

“This is stone cold crazy,” she tweeted early Sunday morning. “After a week of crazy.”

Read more:

From order to disorder: How Trump’s immigration directive exposed GOP rifts

Democrats escalate their attacks on Trump, while Republicans accuse him of leaving them in the dark

Democrats rally outside Supreme Court with protesters who want them to do more