President Obama on Thursday afternoon formally endorsed Hillary Clinton for president after months of remaining neutral in the primary race against Bernie Sanders.

"I want to congratulate Hillary Clinton on making history as the presumptive Democratic nominee for president of the United States. Look, I know how hard this job will be. That's why I know Hillary will be good at it. In fact, I don't think there's ever been someone so qualified to hold this office," Mr. Obama said in a three-minute-long video released on social media by Clinton's campaign.

CBS News' Julianna Goldman reports that the video was actually taped on Tuesday, before that day's primary results even came in, and it was set for release after the president's meeting with Sanders on Thursday, according to a person familiar with the plan.

Get Breaking News Delivered to Your Inbox

When Mr. Obama spoke earlier this week with Sanders, he hold Sanders that he would be endorsing Clinton. Sanders asked the president for a meeting and asked that he not issue his endorsement until after the meeting.

During their meeting on Thursday, they talked about how Sanders can keep engaging his voters and supporters and keep his policy issues in the spotlight. The president recognized the important role Sanders can play by building on his grassroots support and keeping up the energy within the party. The president talked about 2008 and his own experience and noted that he was grateful Clinton ultimately supported his candidacy. The source said there was not a specific ask of Sanders to get his supporters to embrace Clinton - rather it was framed as keeping the grassroots engaged in the Democratic process and party, up and down the ticket.

In the video, the president spoke of her role as his secretary of state and how she participated in the plan to get Osama bin Laden in 2011.

"I have seen her judgment. I've seen her toughness. I've seen her commitment to our values up close," Mr. Obama said. "I'm with her. I am fired up and I cannot wait to get out there and campaign for Hillary." He did not mention Clinton's rival for the presidency, Donald Trump.

The video was posted only about an hour after he met with Sanders in the Oval Office. While he didn't suspend his campaign, Sanders told reporters that he has spoken with Clinton this week, plans to meet with her soon and will work with her to ensure that Donald Trump isn't elected in November.

Mr. Obama said Sanders has run "an incredible campaign" and has made the Democratic Party stronger by shining a spotlight on economic inequality and attracting young people to the political process.

Until now, the president has said he would remain neutral in the Democratic primary race and allow the primary contests to play out. The last six major primaries were on Tuesday and among the states that Clinton won, she picked up California and New Jersey, which had the largest share of delegates at stake.

The final primary is next Tuesday in Washington, D.C.

Trump tweeted about the endorsement afterward and Clinton retweeted it with a line that made it go viral.

CBS News' Julianna Goldman contributed to this report.