The Clinton campaign released a video on June 9 showing President Obama endorsing her as his successor. (Hillary Clinton)

The Clinton campaign released a video on June 9 showing President Obama endorsing her as his successor. (Hillary Clinton)

President Obama offered his formal endorsement of Hillary Clinton with a video Thursday and plans to campaign with the former secretary of state in Wisconsin next week, efforts aimed at speeding the Democratic Party’s unification around its presumed presidential nominee.

“I know how hard this job can be. That’s why I know Hillary will be so good at it,” Obama says in the video. “In fact, I don’t think there’s ever been someone so qualified to hold this office. She’s got the courage, the compassion and the heart to get this job done.”

The swift endorsement came after the president met with Sen. Bernie Sanders at the White House on Thursday and the senator from Vermont indicated that he is preparing to exit the Democratic nominating battle.

Sen. Elizabeth Warren (D-Mass.) offered her own endorsement Thursday evening on MSNBC’s “The Rachel Maddow Show.” And at a speech before the American Constitution Society, she called presumptive Republican nominee Donald Trump a “thin-skinned, racist bully.” The only Democratic woman in the Senate who had not yet endorsed Clinton, Warren is expected to help bring Sanders supporters, and the left generally, in line behind the presumptive nominee.

Sanders has been under pressure to stand down and help unify the party after a long and contentious contest with Clinton for the nomination. One of Obama’s tasks will be to try to rally those who have backed Sanders behind Clinton’s candidacy.

1 of 42 Full Screen Autoplay Close Skip Ad × Highlights from Bernie Sanders’s campaign, in pictures View Photos The senator from Vermont is Hillary Clinton’s rival in the contest for the Democratic presidential nomination. Caption The senator from Vermont is Hillary Clinton’s rival in the contest for the Democratic presidential nomination. June 14, 2016 Bernie Sanders arrives at the Capital Hilton to meet with Hillary Clinton in D.C. Matt McClain/The Washington Post Buy Photo Wait 1 second to continue.

The short video provides a preview of the central theme Obama is likely to hammer away at for months to come: that Clinton’s experience, toughness and values make her more qualified to lead the country than a real estate magnate who has never held public office.

“And from the decision we made in the Situation Room to get bin Laden, to our pursuit of diplomacy in capitals around the world, I have seen her judgment, I’ve seen her toughness,” the president said. “I’ve seen her commitment to our values up close.”

Clinton and Obama will campaign together soon in Green Bay, Wis., aides to both politicians confirmed. The president plans to campaign in industrial states like Wisconsin, where Trump has actively wooed Democrats, as well as do outreach targeted at young voters, Latinos and African Americans.

In an interview with Bloomberg News, timed to correspond with the video’s release, Clinton welcomed Obama’s endorsement.

“It just means so much to have a strong, substantive endorsement from the president. Obviously I value his opinion a great deal personally,” Clinton said. “It’s just such a treat because over the years of knowing each other, we’ve gone from fierce competitors to true friends.”

Sanders told reporters after his White House meeting that he is looking forward to working with Clinton to defeat Trump in the fall.

“Needless to say, I’m going to do everything in my power, and I’m going to work as hard as I can, to make sure that Donald Trump does not become president of the United States,” he told reporters as his wife, Jane, stood behind him.

Trump, meanwhile, offered his thoughts in a tweet: “Obama just endorsed Crooked Hillary. He wants four more years of Obama — but nobody else does!”

Sanders said he still plans to compete in Tuesday’s final Democratic primary in the District, but he added that “in the near future” he hopes to meet with Clinton to talk about ways they can work together.

His comments suggested that Sanders is preparing to exit the long and grueling presidential race so long as leading Democrats make a genuine effort to incorporate his policy ideas into their broader agenda.

The hour-long meeting with Obama came on a busy day for Sanders in Washington. The senator also met on Capitol Hill with Senate Minority Leader Harry M. Reid (D-Nev.) and Sen. Charles E. Schumer (D-N.Y.); Reid has sought to play the role of peace broker at the end of a contentious nominating contest between Sanders and Clinton.

“I’m not pushing him to do anything. I think he needs a little time to decide what he wants to do,” Reid told reporters, adding that he has invited Sanders to speak to Senate Democrats next week and expects Sanders to campaign for his colleagues. “I didn’t hear a single word about him trying to change the fact that she’s the nominee. I think he’s accepted that.”

Schumer said Sanders is “not worn down. He’s not bitter. He’s not angry.” He added: “He wants to make sure that issues he’s pushed for have vitality.”

Sanders also met with Vice President Biden at his residence at the Naval Observatory.

“He is seeking out the counsel of people he admires and respects,” Sanders spokesman Michael Briggs said of the senator.

Increasingly, Sanders’s aim seems to be to use the leverage that he and his millions of loyal followers have garnered to ensure that his campaign agenda — anchored around issues of income and wealth inequality — has a central place in the Democratic Party’s platform and general-election strategy.

[Sanders supporters more open to D.C. primary participation than longer battle against Clinton]

Following his meeting with Obama, Sanders ticked off several priorities, including fighting childhood poverty, expanding Social Security benefits, reducing college debt, rebuilding the nation’s “crumbling” infrastructure and making corporations and wealthy individuals pay more in taxes.

Sanders’s visit to Washington prompted reflections from many who know him, particularly on Capitol Hill. Speaking to reporters there, Sen. Richard J. Durbin (D-Ill.), an Obama ally, said that “of course” Sanders will have leverage over the party’s direction and platform.

“I remember when he first left. It was kind of everybody, with a real smile, put their arm around him and said, ‘Good luck, Bernie.’ And then we watched as he put together an incredible campaign, not just in the fundraising but in the way that he lit up so many Democrats and even independents who came to his side. He became a force, a political force, and a positive one as far as I’m concerned. I think our party can learn from his candidacy, and I think we’re going to count on him to bring us across the finish line with a victory in November.”

Sanders ended Thursday with the kind of large-scale rally that has become a signature of his campaign, this one in a field near Robert F. Kennedy Memorial Stadium in the District, before flying home to Burlington, Vt.

In a nearly hour-long speech to a crowd of 3,000 people, Sanders made no mention of his standing in the race and neither congratulated Clinton nor criticized her.

[Next for Democrats: A delicate dance to broker peace between Clinton, Sanders]

The rally came five days ahead of the Democratic primary in the District. Twenty delegates are in play, but there is little at stake after Clinton clinched the nomination this week, punctuated by her decisive primary win Tuesday in California, the nation’s most populous state.

Nonetheless, Sanders said he would make statehood for the District a prominent part of his campaign here, noting that it has a similar population to Vermont, which is represented by two senators and a congressman in Washington.

A senior administration official said that Obama had told Sanders on Sunday that he was planning to endorse Clinton. The Sanders campaign asked that Obama wait until after meeting with Sanders, according to the administration official, who spoke on the condition of anonymity to speak more freely about private conversations.

The Obama video was taped on Tuesday, before Clinton had claimed victory, according to White House press secretary Josh Earnest.

Sanders’s 11:15 a.m. meeting Thursday with Obama was arranged at the senator’s request, according to the White House, and went longer than scheduled.

Standing before reporters after his meeting with Obama, Sanders began his remarks by thanking the president and the vice president “for the degree of impartiality” they showed throughout the primary race after promising to stay neutral.

“What they said at the beginning is that they would not put their thumbs on the scale,” he said, “and in fact, they kept their word, and I appreciate that very, very much.”

After outlining the movement he has sought to create over the past year, saying he would continue to push for a more expansive federal government that would help the poor, senior citizens and young people, Sanders made clear that he sees the Republican nominee as a serious threat to U.S. society.

“Donald Trump would clearly, to my mind and to, I think, the majority of Americans, be a disaster as president of the United States,” he said. “It is unbelievable to me, and I say this with all sincerity, that the Republican Party would have a candidate for president who in the year 2016 makes bigotry and discrimination the cornerstone of his campaign.”

Speaking to reporters Thursday, Earnest said that Obama and Sanders had “a friendly conversation that was focused on the future” and that the senator was “not surprised” by the president’s endorsement of Clinton.

He also made it clear that Obama had backed Clinton all along, saying, “I’m not aware the president ever changed his mind in the course of the Democratic primary.”

He even went so far as to say that Clinton is more qualified to be president than Obama was in 2008.

“Just take a raw look at qualifications, I think that’s pretty obvious,” Earnest said.

Before the meeting, Obama and Sanders smiled and chatted as they walked along the White House colonnade and a throng of White House reporters recorded the moment. They then walked into the Oval Office.

In Reid’s Capitol suite on Thursday afternoon, Sanders, taking a chair across from Reid by a bookshelf, sat silent as reporters asked him about Obama’s endorsement.

“Okay, you guys, we’re not going to take any questions,” Reid said as Sanders stared straight ahead with his hands on his knees. “That’s kind of the deal that I made.”

Sanders had not spoken to the media since Tuesday afternoon. Most notable in his interactions with voters, both in California and later with volunteers in Vermont, has been what has gone unsaid: He has rarely taken shots at Clinton or even mentioned her, save for a brief crack while shaking hands with voters about whether she received any votes in California and later telling supporters that he had a “very gracious call” from her.

Sanders lost four of the six primaries and caucuses Tuesday, including the two largest, New Jersey and California. He had hoped to make a statement in California by beating Clinton by a sizable margin.

[Clinton celebrates victory, declaring: ‘We’ve reached a milestone’]

According to people close to him, carrying on his campaign was an unsurprising but deeply personal decision made by Sanders on Tuesday at his hotel in Los Angeles as the results came in. Despite the disappointing results, Sanders remains convinced that the gains he has made and the movement he has led should not be quickly discarded in the name of party unity.

Dan Balz, Anne Gearan, Abby Phillip and Karen Tumulty contributed to this report.