Then-President Barack Obama holds a year-end news conference in Washington, D.C., Dec. 16, 2016. SAUL LOEB/AFP/Getty Images

Former president Barack Obama rejected the idea Monday that President Trump based his immigration executive order on a policy adopted by his own administration, and he endorsed the protests that have been taking place across the country in response to the new restrictions.

Trump has said that his move to ban the entry of citizens of seven Muslim-majority countries into the United States, and to suspend temporarily the admission of refugees, was based in part on a decision in 2011 by then-President Obama to ban the admission of Iraqis to the country after evidence surfaced that two Iraqis seeking resettlement had been linked to terrorist activity in their homeland. The Obama and Trump administrations also identified the same seven countries as harboring terrorism threats.

Former Obama administration officials have denied that there was ever a halt to the awarding of visas to Iraqis, though the processing of these applications slowed after they were subject to more intense scrutiny.

Obama, who has remained publicly silent about his successor since leaving office 10 days ago, pledged before leaving office to only speak about Trump's policy moves “where I think our core values may be at stake.” On Monday, his spokesman, Kevin Lewis, said in a statement, “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.”

Alluding to the widespread protests taking place in major airports and cities in response to the new immigration policy, Lewis said that Obama “is heartened by the level of engagement taking place in communities around the country.”

Hundreds of protesters gathered at the arrivals gate of Washington Dulles International Airport to push back against President Trump's executive order that targeted citizens from seven predominantly Muslim countries. A federal judge in New York blocked deportations nationwide late Saturday of those detained on entry to the United States. (McKenna Ewen/The Washington Post)

“In his final official speech as President, he spoke about the important role of citizen and how all Americans have a responsibility to be the guardians of our democracy — not just during an election but every day,” 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.”

Read more from Politics: 

Unnamed White House official on implementing travel ban: ‘It really is a massive success story.’

Dissent memo circulating in the State Department over Trump’s policy on refugees and immigrants

Trump says ‘all is going well’ on immigration order amid questions and confusion