Sanders said he hoped to meet with Clinton soon to discuss their common goal.

But Sanders, speaking to reporters at the White House, stopped short of endorsing Hillary Clinton, the presumptive Democratic nominee. The president was expected to endorse her later in the day.

WASHINGTON (AP) — With pressure growing for him to quit the presidential race, a subdued Bernie Sanders emerged from a meeting with President Barack Obama on Thursday vowing to work with primary rival Hillary Clinton to defeat Republican Donald Trump in the general election.

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


Sanders, standing in the White House driveway with his wife, Jane, at his side, said he planned to continue his campaign, although he strongly suggested he was largely focused on pressing key issues, not seeking victory. He said he would compete in the in Washington, D.C., primary on Tuesday, but noted his interested was largely in pushing for statehood.

Sanders’ remarks came after a longer-than-expected Oval Office sit-down with Obama, part of Democratic leaders intensifying effort to unite behind Clinton as the nominee of the party.

Clinton declared victory over Sanders on Tuesday, having captured the number of delegates needed to become the first female nominee from a major party.

Though Sanders has shown signs he understands the end of his race is near — he was about to layoff off about half his team — he has vowed to keep fighting, stoking concern among party leaders eager for the primary race to conclude. Still looking like a candidate, Sanders planned a rally Thursday evening in Washington, which holds the final primary contest next week.


The situation has put Obama, the outgoing leader of his party, in the sensitive position of having to broker detente between Clinton and Sanders without alienating the runner-up’s supporters, many of whom are angry over what they see as the Democratic establishment’s efforts to strong-arm him out of the race. Clinton is counting on Sanders’ supporters backing her to defeat Trump.

Obama has been trying to give Sanders the courtesy of exiting the race on his own terms.

‘‘It was a healthy thing for the Democratic Party to have a contested primary. I thought that Bernie Sanders brought enormous energy and new ideas,’’ Obama said Wednesday during a taped appearance on ‘‘The Tonight Show Starring Jimmy Fallon.’’ ‘'And he pushed the party and challenged them. I thought it made Hillary a better candidate.’’

Obama had planned to use Thursday’s meeting, which the White House emphasized was requested by Sanders, to discuss how to build on the enthusiasm he has brought to the primary, the White House said. That’s a diplomatic way of saying Obama wanted to know what Sanders wants.

Sanders also was headed to a meeting with Senate Minority Leader Harry Reid, who endorsed Clinton weeks ago. The Vermont senator was to meet with Vice President Joe Biden, too.

Even some of Sanders’ staunchest supporters have started looking to Clinton. Sen. Jeff Merkley of Oregon, the one Senate Democrat to endorse Sanders, said Clinton was the nominee and offered his congratulations. And Rep. Raul Grijalva, a Sanders backer from Arizona, suggested the time to rally behind Clinton would come after the District of Columbia primary on Tuesday.


‘‘Bernie’s going to do the right thing,’’ Grijalva said.

Now head-to-head in the presidential race, Clinton and Trump have one thing in common: Both are working to woo Sanders supporters. Trump has said he welcomes Sanders’ voters ‘‘with open arms’’ while Clinton has vowed to reach out to voters who backed her opponent in the Democratic primary.

‘‘He has said that he’s certainly going to do everything he can to defeat Trump,’’ Clinton said of Sanders in an Associated Press interview. ‘‘I'm very much looking forward to working with him to do that.’’

Trump, despite a string of victories this week that reaffirmed his place as the GOP nominee, was still working to convince wary Republicans that he’s presidential material. Looking ahead to an upcoming speech attacking Clinton and her husband, Trump tried to turn the page following a dust-up over his comments about a Hispanic judge’s ethnicity.

That controversy and others before it have led prominent Republicans, including House Speaker Paul Ryan, to openly chastise their party’s nominee. Yet Trump’s dominance in the GOP race is hard to overstate: He now has 1,542 delegates, including 1,447 required by party rules to vote for him at the convention. It takes just 1,237 delegates to win the Republican nomination.

About half his campaign staff is being laid off, two people familiar with the plans said. They spoke on condition of anonymity because they weren’t authorized to speak publicly about the layoffs.


Obama’s aides have said he’s itching to get off the sidelines and take on Trump. The key question is whether voters who helped elect him twice will follow his lead now that he’s not on the ballot. Democrats have yet to see that powerful coalition of minorities, young people and women reliably show up for candidates not named Obama.

‘‘It’s going to be hard to get African-American turnout as high as Obama got it, and to get youth turnout as high as Obama got it,’’ said Celinda Lake, a Democratic pollster. ‘‘We have to work really hard.’’

Watch: Sanders addresses the media after speaking with Obama