Gov. Jay Inslee of Washington, who mounted a dogged presidential candidacy raising the alarm about climate change, dropped out of the 2020 race on Wednesday after struggling to earn a place in the next Democratic primary debate.

Mr. Inslee plans to compete for a different office instead — the one he already holds.

“I want to continue to stand with you in opposing Donald Trump and rejecting his hurtful and divisive agenda, while strengthening and enhancing Washington State’s role as a progressive beacon for the nation,” he said in an email to supporters on Thursday announcing his plan to run for a third term in 2020.

While his presidential campaign had “advanced the dialogue” on climate change, Mr. Inslee said, he had concluded that the electoral obstacles before him were insurmountable.

“I’m not going to be the president, so I’m withdrawing tonight from the race,” Mr. Inslee said in an interview Wednesday night on MSNBC, where he first revealed he was ending his campaign.