WASHINGTON —President Barack Obama endorsed Hillary Clinton as his successor Thursday, saying, “I don’t think there’s ever been someone so qualified to hold this office.”

Obama’s expected endorsement came after he met with her rival for the Democratic presidential nomination, Sen. Bernie Sanders (I-Vt.), in an hourlong Oval Office meeting and Sanders’ declaration he was staying in the race at least through the last primary on Tuesday.

Obama and Sanders had a wide-ranging conversation about the economy, according to Sanders’ spokesman Michael Briggs, who added Sanders was happy to receive his counsel.

Sanders was meeting with Sen. Harry Reid (D-Nev.) and Sen. Chuck Schumer (D-N.Y.), the current and future top Democrats in the Senate, on Capitol Hill Thursday afternoon.

Sanders then will go to the Naval Observatory to see Vice President Joe Biden. Sanders will be addressing a rally this evening at RFK Stadium.

Sanders, who appeared with this wife, Jane, outside the West Wing after the hourlong Oval Office meeting Thursday, made it clear he was not ready to end his White House bid and endorse Clinton, who declared victory after Tuesday’s primaries.

Although he did not disclose what he and Obama had discussed, Sanders said he said he would seek to win the final Democratic primary on Tuesday in Washington, D.C., and will ply his campaign issues at the Democratic National Convention next month.

“Our campaign has been about building a movement which brings working people and young people in the political process to create a government that represents all of us and not just a handful of wealthy campaign contributors,” Sanders said.

“We will continue doing everything we can to oppose the drift that currently exists toward an oligarchic form of society where a handful of billionaires exercise enormous power over our political, economic [and] media life,” Sanders said.

Sander’s defiant stance — and his assertion that a full count of the California votes in Tuesday’s primary will show a much closer final tally between Clinton and him than the unofficial one — could force Obama to put off an endorsement of Clinton until after the D.C. primary.

But Sanders also said he would go all out to defeat Trump, the New York businessman who is the presumptive presidential nominee of the Republican Party.

“It is unbelievable to me, and I say this in all sincerity, that we would have a candidate for president who in the year 2016 would make bigotry and discrimination the cornerstone of his campaign,” Sanders said, saying Trump would be a “disaster” as president.

“Needless to say I am going to do everything in my power, and I will work hard as I can, to make sure Donald Trump does not become president of the United States,” Sanders said.

He added, “I spoke briefly to Secretary Clinton Tuesday night and I congratulated her on her very strong campaign. I look forward to meeting with her in the near future to see how we can work together to defeat Donald Trump and to create a government that represents all of us and not just the one percent.”

Afterward, Sanders headed to Capitol Hill to meet with Sen. Harry Reid (D-Nev.), the top Democrat in the Senate.

Obama and Democratic leaders are seeking to nudge Sanders out of the race and into the fold to create a unified party effort to defeat Trump in the presidential race and win more seats in the House and Senate this fall.

But they have insisted that they will give Sanders space to come to terms with Clinton’s lead in both pledged and superdelegates as they prepare for the Democratic National Convention in Philadelphia July 25-28.