SAN DIEGO — Despite over a quarter-century representing California in the Senate, Dianne Feinstein in a humiliating setback was denied the endorsement of the California Democratic Party on Saturday, signaling a shift away from moderates at the highest levels of the state political infrastructure.

State Sen. Kevin de León, offering the strongest challenge to Feinstein since her election, garnered 54 percent of the vote of nearly 3,000 delegates gathered here at the state convention, compared to just 37 percent for Feinstein. The state party endorsement gives candidates coveted placement on state party mailers and can raise the profile of candidates who may have a deficit in fundraising. It’s not like Feinstein has a need to raise her profile in the state; she has plenty of money to get her message out. But denying the party endorsement to a sitting U.S. senator is a remarkable turn of events for a lawmaker who has been a fixture in California politics going back to her days as a San Francisco board supervisor, where she was first elected in the late 1960s.

Had de León hit 60 percent, he would have won the endorsement outright. As it is, neither can claim it.

Feinstein, who would be 85 by the time she is sworn in for another term, does have a checkered history with the state party. In 1990, she famously gave a speech endorsing the death penalty during a campaign for governor, drawing loud boos from the hall. State delegates gave their endorsement in that governor’s race to Attorney General John Van de Kamp. Feinstein then used the footage of delegates booing her in campaign ads to prove her political independence. She won the primary, but lost the general election to Pete Wilson. (She then won Wilson’s vacated Senate seat.)

But that was long ago, and Feinstein has consistently earned the state party’s support for U.S. Senate in the 28 years since.

In the most recent poll from the Public Policy Institute of California, taken in early February, Feinstein held a 46-17 lead over de León, with about one-third of likely voters undecided. De León is expected to land in the top two with Feinstein and move to the general election in November, although Justice Democrats-endorsed activist Alison Hartson has earned the most small-dollar donations in the race, even more than Feinstein. Hartson was not on the Senate endorsement ballot, though another challenger, attorney Pat Harris, was.

The party also chose endorsements for statewide offices, as well as congressional and legislative races. There was no endorsement in the closely contested gubernatorial race, between Lt. Gov. Gavin Newsom, Treasurer John Chiang, former Los Angeles Mayor Antonio Villaraigosa, and former State Superintendent of Public Instruction Delaine Eastin.

In congressional races, Bryan Caforio, a Democrat with support from leaders in the party running in the winnable 25th District, fell short of an endorsement against progressive challenger Katie Hill amid rumors that the party brass flipped on the race because of Hill’s fundraising prowess. In the 45th District, former Chuck Schumer aide and Center for American Progress fellow Dave Min got more than the required 60 percent support for an endorsement, in a race that includes foreclosure fraud expert Katie Porter.

Feinstein competed hard for the endorsement, holding conference calls and a scrambled egg breakfast with delegates, sending them numerous mailers and text messages, and appearing at party caucus meetings for the first time in decades. She reportedly received a smattering of boos at the party’s labor caucus when she said she voted with labor on “every vote I know.”

At the state environmental caucus, Feinstein signed a pledge that she would not take campaign contributions from the oil industry and claimed that she indeed never took them, according to the state party environmental chair, R.L. Miller. While this approaches reality — Feinstein has received $3,600 from oil and gas interests in the 2013-2018 cycle — the story changes if you widen out to the entire energy sector. The No. 1 donor to Feinstein’s campaign committee in this cycle is Edison International, the state’s electric utility. Overall, electric utilities have donated $127,975 to Feinstein since 2013, the No. 2 industry behind law firms and lawyers.

At a speech on Saturday afternoon, de León touted the progressive accomplishments of the state legislature and said, “In your state Senate, Democrats act like Democrats.” He indirectly singed Feinstein for voting for NSA surveillance legislation and the war in Iraq. “Real leadership, moral clarity is always doing the right thing when no one is watching,” de León said, alluding to Feinstein’s sharp turn leftward during the primary.

On the other hand, Feinstein outsourced much of her time to Secretary of State Alex Padilla, her former aide, effectively drafting off a more popular politician. After getting some applause for her work authoring the assault weapons ban in 1994 and a vow to try to reinstate it, Feinstein ran out of her scheduled time for the speech. “I guess my time is up,” Feinstein said, to snickering.

“Damn right!” jeered critics in the crowd. “Time’s up!”

Top photo: U.S. Sen. Dianne Feinstein, D-Calif., speaks to members of the media prior to a number of votes at the Capitol on Feb. 15, 2018 in Washington, D.C.