President Barack Obama has said he does not intend to become his successor's constant critic — but reserved the right to speak out if President-elect Donald Trump or his policies breach certain “values or ideals.”

Offering a rare glimpse into his thoughts on his post-presidency, Mr Obama suggested once he was out of office he would try and uphold the tradition of ex-presidents stepping aside quietly to allow their successors space to govern. He heaped praise on former President George W Bush, saying he “could not have been more gracious to me when I came in” and said he wanted to give Mr Trump the same chance to pursue his agenda “without somebody popping off” at every turn.

But Mr Obama suggested there may be limits to his silence.

“As an American citizen who cares deeply about our country, if there are issues that have less to do with the specifics of some legislative proposal or battle or go to core questions about our values and ideals, and if I think that it's necessary or helpful for me to defend those ideals, I'll examine it when it comes,” Mr Obama said.

Mr Obama, who has consistently praised Bush for the way he's handled his ex-presidency, faces a conundrum about how to handle his own. Though he's vowed to ensure a smooth handover of power, Mr Obama is keenly aware he's being replaced by a new president who holds antithetical views on issue after issue.

The president spoke out vigorously throughout the campaign against Mr Trump's calls for banning Muslim immigrants, deporting millions of people living in the US illegally, repealing “Obamacare,” and cancelling the Paris climate deal, to name a few. Those policy proposals and others like them have stoked fear for many Americans who oppose Mr Trump and are hoping vehement opposition from Obama and other Democrats might prevent Mr Trump from implementing them.

Though Mr Obama did not specify what might trigger him to break silence, he left himself a broad window of possibilities. His comments suggested he'd be most inclined to weigh in if Mr Trump violated basic principles Mr Obama has tried to uphold, such as minority rights, equal protection and respect for civilian life. Mr Obama has long warned that Mr Trump might impulsively use nuclear weapons, and has cast a dim view on ideas like a Muslim registry, which Trump's incoming chief of staff declined on Sunday to rule out.

World reaction to President Trump: In pictures Show all 29 1 /29 World reaction to President Trump: In pictures World reaction to President Trump: In pictures London, England AP World reaction to President Trump: In pictures London, England Reuters World reaction to President Trump: In pictures Manila, Philippines Getty Images World reaction to President Trump: In pictures Manila, Philippines Getty World reaction to President Trump: In pictures Mosul , Iraq Getty World reaction to President Trump: In pictures Manila, Philippines AP World reaction to President Trump: In pictures New Delhi, India Reuters World reaction to President Trump: In pictures Karachi, Pakistan EPA World reaction to President Trump: In pictures Jakarta, Indonesia Reuters World reaction to President Trump: In pictures Lagos, Nigeria AP World reaction to President Trump: In pictures Kabul, Afghanistan AP World reaction to President Trump: In pictures Jerusalem. Israel Reuters World reaction to President Trump: In pictures Moscow, Russia Reuters World reaction to President Trump: In pictures Seoul, South Korea AP World reaction to President Trump: In pictures Lagos, Nigeria AP World reaction to President Trump: In pictures Peshawar, Pakistan EPA World reaction to President Trump: In pictures Jakarta, Indonesia Reuters World reaction to President Trump: In pictures Hyderabad, India AP World reaction to President Trump: In pictures Kolkata, India AP World reaction to President Trump: In pictures Sydney, Australia Getty World reaction to President Trump: In pictures Sydney, Australia AP World reaction to President Trump: In pictures Aleppo, Syria Reuters World reaction to President Trump: In pictures Mexico City, Mexico AP World reaction to President Trump: In pictures Port-of-Spain, Trinidad and Tobago Reuters World reaction to President Trump: In pictures Jerusalem, Israel EPA World reaction to President Trump: In pictures Baghdad, Iraq Rex World reaction to President Trump: In pictures Gaza Strip, Palestinian Territories Rex World reaction to President Trump: In pictures Tokyo, Japan Rex World reaction to President Trump: In pictures Mexico City, Mexico Getty

Yet Mr Obama suggested that while he might not always hold his tongue, his goal wasn't to spend his time publicly disparaging his replacement.

“My intention is to, certainly for the next two months, just finish my job,” Mr Obama said. “And then after that, to take Michelle on vacation, get some rest, spend time with my girls, and do some writing, do some thinking.”

Mr Bush, like many ex-presidents in something that has become a tradition, strictly avoided opining on politics during Mr Obama's eight years. Former President Bill Clinton, after leaving office, focused his attention on global humanitarian issues, especially as his wife entered politics. Former President Jimmy Carter was more vocal in his views in his post-White House years, occasionally stirring up controversy with comments critical of Israel.

Obama: We have to stop rise in 'crude nationalism'

Mr Obama's remarks at a news conference in Lima offered some of his most specific indications to date of how he feels Democrats and Trump opponents should handle the next four years. Asked whether Democrats in the Senate should follow Republicans' example of refusing to even consider a Supreme Court nominee, Mr Obama said they should not.

“You give them a hearing,” said Mr Obama, whose own Supreme Court nominee, Merrick Garland, has lingered for more than half a year due to the GOP's insistence that no Obama nominee be considered. Mr Obama said he certainly didn't want Democrats to adopt that tactic spearheaded this year by Senate Majority Leader Mitch McConnell.

“That's not why the American people send us to Washington, to play those games,” Mr Obama said.

Mr Obama's remarks came as he concluded his final world tour as president. On his final day in Peru, Mr Obama chatted briefly with Russian President Vladimir Putin about Ukraine and the Syria crisis, though Mr Obama said the US accusation that Moscow tried to influence the US election didn't come up. The four-minute conversation, likely their last face-to-face interaction, came amid intense speculation about whether Trump's election might herald a more conciliatory approach to Russia

Mr Putin, speaking later in Lima, said he and Mr Obama had a difficult working relationship but “always respected each other's positions — and each other.” He said he'd thanked Mr Obama and told him he'd be welcome in Russia “at any time.”