WASHINGTON — Before he left office in January, President Obama offered his successor accolades and advice in a private letter that underscored some of his concerns as he passed the baton.

In the letter, published Sunday by CNN, Obama praised President Trump, saying: “Congratulations on a remarkable run. Millions have placed their hopes in you, and all of us, regardless of party, should hope for expanded prosperity and security during your tenure.”

Obama went on to urge Trump to “build more ladders of success for every child and family,” to “sustain the international order” and to protect “democratic institutions and traditions.”

Obama wrote: “We are just temporary occupants of this office. That makes us guardians of those democratic institutions and traditions – like rule of law, separation of powers, equal protection and civil liberties – that our forebears fought and bled for.”

It is customary for presidents to leave notes for their successors. But typically these missives do not come to light so quickly. The handoff letters from President George W. Bush in 2009 and President Clinton in 2001 were revealed this year. CNN reports it received the Obama letter from “someone Trump showed it to.”

After taking office, Trump praised the note from Obama, calling it a “beautiful letter” in an interview with ABC. Trump added that he called Obama to thank him for the note.

The White House declined to comment, as did a spokesman for Obama.

In the letter, Obama offered some advice: urging Trump to provide opportunities for those “willing to work hard,” arguing that American “leadership in this world really is indispensable” and asking him to leave “instruments of our democracy at least as strong as we found them.”

Obama also wrote that Trump should “take time, in the rush of events and responsibilities, for friends and family. They’ll get you through the inevitable rough patches.” He concluded by wishing the “very best as you embark on this great adventure.”

Former top Obama aide David Axelrod seized on the letter on Twitter, writing: “What wise and eloquent advice from one president to another. Sad how thoroughly (at)POTUS has disregarded it!”