Sen. Dianne Feinstein is making her 2020 presidential endorsement official: She’s backing former Vice President Joe Biden over a field that includes her California colleague, Sen. Kamala Harris.

The endorsement was expected for months, but the California Democrat hadn’t formally announced it until Tuesday. The Chronicle was first to report her decision.

Feinstein leaned on her long working relationship with Biden in the Senate to inform her choice — he was a 20-year veteran lawmaker from Delaware when she was first elected in 1992.

“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 Tuesday. “During his time in Congress and in the White House, Joe Biden has been a tireless fighter for hardworking American families.”

Feinstein, who has pushed anti-gun violence measures throughout her Senate career, added that “by making gun reform one of the pillars of his campaign and policy, Joe Biden demonstrates that he clearly recognizes what is needed to keep Americans safe.”

Feinstein said she believes Biden can “deliver real solutions” in a Congress “dominated by ideological polarization.”

The endorsement is hardly surprising. Last week, Feinstein hosted a fundraiser for Biden in her San Francisco home. She began telegraphing her choice back in January — before Biden announced his candidacy — when she told reporters that “he brings a level of experience and seniority which I think is really important.”

A new poll by the nonpartisan Public Policy Institute of California showed Biden slipping into a virtual three-way tie in the state with Sens. Elizabeth Warren and Bernie Sanders. Harris was running a distant fourth in that poll.

Nationally, Warren and Biden are virtually tied atop the field, according to the latest amalgamation of polls by RealClearPolitics.com.

Joe Garofoli is The San Francisco Chronicle’s senior political writer. Email: jgarofoli@sfchronicle.com Twitter: @joegarofoli