RICHMOND — Virginia Gov. Ralph Northam (D) on Thursday endorsed his predecessor, former governor Terry McAuliffe, in the race for the Democratic gubernatorial nomination.

Crediting McAuliffe as "the architect of the new Virginia economy," Northam said from a podium at the Norfolk waterfront that he was endorsing him because "it's important that we continue to build on the success that we've had over the last three years."

The endorsement is a prize for McAuliffe in the crowded and diverse field of contenders. Four other candidates are vying for the nomination in the June 8 primary election.

They are Lt. Gov. Justin Fairfax, only the second Black man elected statewide in Virginia; state Sen. Jennifer L. McClellan (Richmond) and former delegate Jennifer Carroll Foy (Prince William), both vying to be the first Black woman elected governor of any state; and Del. Lee J. Carter (Manassas), a self-proclaimed socialist.

“When Terry puts his mind to something, he’ll move heaven and earth to make it happen,” Northam said in a statement announcing the endorsement before his Norfolk appearance. “Virginians need and deserve Terry’s committed leadership as our next governor to continue to move us forward and build on the incredible progress Democrats have made over the past eight years.”

Northam made another appearance to announce the endorsement again at noon in Alexandria. Like all Virginia governors, Northam is barred by the state constitution from serving a second consecutive term.

McAuliffe left office in 2018.

Two of the other hopefuls issued responses Thursday. “I’m focused on the voters and that’s the endorsement I’m looking for,” ­McClellan said at a hastily called news conference in downtown Richmond, live-streamed on her Facebook page.

McClellan said she had spoken with Northam about the race before the recent General Assembly session but had no advance warning that she didn’t win his favor. Asked how she felt about McAuliffe lining up support, she seemed to dismiss him as a has-been. “Virginians are not looking backwards, they’re looking forwards,” she said.

Carter tweeted: “One pro-pipeline, pro-Amazon, pro-casino rich guy endorsing another. We need a Governor who will stop giving our money to big business, and start transforming our economy into one that WE, the people of Virginia, own and operate!”

Northam’s political adviser said the governor met with all of the candidates except Carter, who did not seek his endorsement, and chose McAuliffe as the person who can continue Virginia’s transformation into a solid blue state.

“The governor feels that that progress could be washed away if we don’t win in this November’s election, so having a proven vote-getter, a proven candidate is good for the party and good for our ability to hold the majority in the House,” Northam adviser Mark Bergman said.

All 100 seats in the House of Delegates are on the Nov. 2 ballot, as well as lieutenant governor and attorney general. Northam has endorsed Del. Jerrauld C. “Jay” Jones (D-Norfolk) for attorney general over incumbent Democrat Mark R. Herring, who is seeking a third term. Northam has not yet endorsed in the lieutenant governor’s race.

McAuliffe’s entry into the gubernatorial contest, with his broad name recognition and vast fundraising prowess, has confounded some Democrats, who felt it was time for a woman or person of color to carry the party’s banner.

Women and people of color drove the party’s rise to power during the Trump administration, winning historic numbers of seats in the General Assembly to take control of the legislature in 2019 for the first time in a generation.

In the past two years, Democrats have passed sweeping changes, including abolishing the death penalty and legalizing marijuana.

Republicans are choosing their candidate for governor in a May 8 convention. Their contenders are state Sen. Amanda F. Chase (Chesterfield); Del. Kirk Cox (Colonial Heights), a former House speaker; retired Army Col. Sergio de la Peña; former think tank executive Peter Doran; former Roanoke sheriff Octavia Johnson; business executive Pete Snyder; and former Carlyle Group executive Glenn Youngkin.