WASHINGTON — On Inauguration Day, in one of his final acts as president, Barack Obama left a letter to Donald Trump, welcoming him to the White House and offering him advice in an office that lacks “a clear blueprint for success.”

For months, the contents of the parting letter remained private — until Sunday, when CNN published the message in full, reportedly obtained from someone Trump showed it to at the White House.

In the letter, Obama leaves his successor with “a few reflections from the past 8 years,” broken down into four points, before extending an offer to help in any way possible.

“First, we’ve both been blessed, in different ways, with great good fortune,” Obama wrote. “Not everyone is so lucky. It’s up to us to do everything we can [to] build more ladders of success for every child and family that’s willing to work hard.”

The 44th president also noted that U.S. leadership was “indispensable” in the world.

“It’s up to us, through action and example, to sustain the international order that’s expanded steadily since the end of the Cold War, and upon which our own wealth and safety depend,” Obama wrote.

In a section of the letter that has been thoroughly examined since, Obama reminded Trump they are both “just temporary occupants of this office” and that, in many ways, the strength of U.S. democracy would rest on Trump’s shoulders.

“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,” Obama wrote. “Regardless of the push and pull of daily politics, it’s up to us to leave those instruments of our democracy at least as strong as we found them.”

Finally, Obama encouraged Trump to carve out time to spend with friends and family, who would help him get through “the inevitable rough patches” of the presidency.

“Michelle and I wish you and Melania the very best as you embark on this great adventure, and know that we stand ready to help in any ways which we can,” Obama concluded. “Good luck and Godspeed.”

White House representatives did not immediately respond to requests for comment Monday. A spokesman for Obama declined to comment.

It has become tradition for the outgoing president to leave a letter to his successor in the Oval Office. The contents of George W. Bush’s letter to Obama were made public for the first time on Inauguration Day this year as well.

“There will be trying moments. The critics will rage. Your ‘friends’ will disappoint you,” Bush wrote to Obama. “But, you will have an Almighty God to comfort you, a family who loves you, and a country that is pulling for you, including me. No matter what comes, you will be inspired by the character and compassion of the people you now lead.”

Bill Clinton’s letter to Bush had been made public by Hillary Clinton during the presidential campaign. In that letter, Bill Clinton told Bush he was now “President of all of us” and wished him well as he embarked on “the greatest venture, with the greatest honor, that can come to an American citizen.”

At a staff swearing-in ceremony two days after his inauguration, Trump seemed touched as he held up the envelope — which was addressed to, simply, “Mr. President” — and spoke of Obama’s message to him.

“I just went to the Oval Office and found this beautiful letter from President Obama,” Trump said then, with Vice President Mike Pence standing behind him. “It was really very nice of him to do that and we will cherish that. We will keep that. And we won’t even tell the press what’s in that letter.”

The public-facing goodwill between the 44th and 45th presidents didn’t last for much longer. Within weeks, Trump was criticizing the Obama administration’s “dumb” deals, accusing Obama of a “Nixon/Watergate” plot to wiretap Trump Tower (a charge the Justice Department later found to be baseless) and doubling down on efforts to undo Obama’s health care legislation.

Obama has kept mostly a low profile since leaving the White House, occasionally posting on social media to defend the Affordable Care Act and to weigh in on major international incidents. On Twitter, at least, Obama has not mentioned Trump by name since the inauguration. According to CNN, not even his closest aides knew the contents of the handwritten letter Obama left Trump.

On CNN’s “State of the Union” Sunday, Rep. Barbara Lee, D-California, described Obama’s letter to Trump as “gracious.”

“I think it was especially magnanimous of President Obama given the fact that Donald Trump led the birther movement in an effort to delegitimize our first African-American president,” she told host Dana Bash. “He rose above that and he moved forward to give some ideas with words of wisdom that I think should be listened to.”

Former senator Rick Santorum, R-Pennsylvania, who also ran against Trump in the Republican presidential primary, said he could understand why Trump showed the letter to White House visitors. He also offered “nitpick” critiques of the message.

“The introduction was a little, was politically correct. He didn’t congratulate him on his victory; he congratulated him on his run,” Santorum told Bash. “He also didn’t say ‘America supports you.’ He said, ‘Millions support you.’ There’s a little caveat at the beginning, but after that moment, I thought the letter was actually very gracious and well written.”

Former Obama aide David Axelrod called the letter “wise and eloquent advice from one president to another” — but also jabbed Trump, of whom he has been openly critical.

“Sad how thoroughly @POTUS has disregarded it!” Axelrod added.