Sen. Dianne Feinstein, D-Calif., announced Tuesday she is endorsing former Vice President Joe Biden in the 2020 Democratic presidential primary -- choosing her former longtime Senate colleague over Kamala Harris, her fellow California Democratic senator.

Feinstein’s endorsement, the first major Democratic endorsement by a top legislator this campaign season, comes as Biden has been losing ground in the polls in the wake of the impeachment inquiry into President Trump and a series of high-profile gaffes while on the stump. But the longtime California senator praised the former vice president for his long tenure in Washington and his work on gun control.

“I’ve worked closely with Vice President Biden and I’ve seen firsthand his legislative ability, his statesmanship, and most importantly his moral fortitude,” Feinstein said in a statement. “During his time in Congress and in the White House, Joe Biden has been a tireless fighter for hard-working American families.”

STAGE IS SET FOR RECORD-BREAKING DEMOCRATIC 2020 DEBATE

She added: “By making gun reform one of the pillars of his campaign and policy platform, Joe Biden demonstrates that he clearly recognizes what is needed to keep Americans safe. And I know, as president, he will continue the fight to restore the soul of the nation from the Oval Office.”

Feinstein’s endorsement of Biden may seem like a snub to Harris – a first-term senator and former California attorney general – but it hardly comes out of left field, as just last week she held a fundraiser for the former vice president in her home in San Francisco. Also back in January – following Biden’s campaign launch – Feinstein said that “he brings a level of experience and seniority which I think is really important," according to the San Francisco Chronicle.

The endorsement from Feinstein – a longtime liberal lawmaker who was first elected in 1992 – comes as Biden is struggling to hold on to his role as Democratic frontrunner. An average of recent polls compiled by Real Clear Politics has Biden and Massachusetts Sen. Elizabeth Warren virtually tied at the top of the Democratic race.

CLICK HERE TO GET THE FOX NEWS APP

Warren, however, has surged in recent months in the polls, while Biden has dropped, and far surpassed him during the most recent quarter of fundraising.

Harris, meanwhile, sits in a distant fifth in the Real Clear Politics average, behind Vermont Sen. Bernie Sanders and South Bend, Ind. Mayor Pete Buttigieg.