WASHINGTON — Rep. Seth Moulton, D-Mass., ended his 2020 presidential campaign on Friday, and announced his intention to seek a fourth House term.

"I will continue to fight for a new generation of leadership in our party and our country," the Iraq War veteran, who failed to gain traction in a crowded presidential primary field, said in remarks to a Democratic National Committee meeting in San Francisco. "And most of all, I will be campaigning my a-- off for whoever wins our nomination in 2020."

Moulton is the third candidate to drop out of the race in the past eight days, following the exits of Washington Gov. Jay Inslee, who will seek a third term, and former Colorado Gov. John Hickenlooper, who has decided to run for the Senate. Party insiders expect the field to be culled even further in the coming weeks as poor polling and barren campaign treasuries force more candidates to assess their reasons for continuing to run.

For Moulton, the campaign had presented an opportunity to raise his profile a little bit, create a larger network of donors and — his allies clearly hope — put himself in position to possibly join the administration if a Democrat wins the presidency.

Download the NBC News app for breaking news and politics

A memo his campaign team circulated to reporters ahead of the announcement focused on his national security and foreign policy credentials, as well as his appetite for taking on President Donald Trump in those areas. Moulton's speech to fellow Democrats on Friday hit on those themes, too.

"We have been challenging Donald Trump where he’s weakest — as commander-in-chief — and showing this country that Democrats are the party of making America strong overseas and safe here at home," Moulton said of his campaign.

He also highlighted his efforts to bring attention to the mental health needs of veterans, which grew out of his battles with post-traumatic stress.

"For the first time in my life, I talked publicly about dealing with post-traumatic stress from my four combat tours in Iraq," he said. "And our team put forward a plan that will end the stigma around mental health — the same stigma that kept me silent for so long, and that kept every presidential candidate before me from talking about mental health struggles themselves."