WASHINGTON (AP) — Conceding his party’s staggering electoral defeat, President Barack Obama on Wednesday invited President-elect Donald Trump to meet with him to discuss the handover of power from his administration to Trump’s.

The White House said Obama called the Republican in the early hours of the morning to congratulate him on his victory in the presidential campaign, which marked a forceful rebuke by voters to Obama’s eight years in office. The two leaders planned to meet Thursday at the White House, where Obama was to update Trump about ongoing planning for the transition.

Obama was to offer his first reaction to the election later Wednesday in a televised statement that the White House said would focus on “what steps we can take as a country to come together after this hard-fought election season.”

“Ensuring a smooth transition of power is one of the top priorities the president identified at the beginning of the year and a meeting with the president-elect is the next step,” White House press secretary Josh Earnest said in a statement.

For Obama, the act of holding the meeting is a humbling blow to his legacy and to his hopes for leaving a lasting imprint on the nation’s policies. Trump has vowed to rip up much of what Obama accomplished, including his signature health care law, the Iran nuclear deal and a painstakingly negotiated trade deal with Asia.

Obama also called Hillary Clinton after it became clear she’d lost the race. The White House said Obama had “expressed admiration for the strong campaign she waged throughout the country.”

It was unclear how substantive Obama’s call was with Trump, or how long it lasted, although the White House noted that Obama placed the call from his residence in the White House, rather than from the West Wing.

Trump’s campaign manager, Kellyanne Conway, described it as a “warm conversation” and a “gracious exchange.” She said Trump had missed the president’s original call as Trump was speaking to supporters in New York, then called him back after leaving the stage.

Like Clinton and other Democrats, Obama didn’t appear to see Trump’s victory coming. As he campaigned vigorously for Clinton in the race’s final days, Obama said he was confident that if Americans showed up to vote, they’d choose against electing the billionaire former reality TV star with no formal government experience.

He had also warned supporters in apocalyptic terms that “the fate of the republic” rested on Clinton defeating Trump on Election Day.