WASHINGTON — California Sen. Kamala Harris is getting the presidential endorsement of the United Farm Workers, the labor group will announce Saturday.

The major endorsement, shared first with The Chronicle, is timed with the California Democratic Party Endorsing Convention in Long Beach, and comes as a shot in the arm as the Democrat’s campaign has struggled in recent months.

The powerhouse California-based farm workers labor group has a long history in progressive politics. Established by liberal organizing icons Cesar Chavez, Dolores Huerta and Gilbert Padilla, the union represents more than 10,000 agricultural workers in California and along the West Coast. The union also has a strong political grassroots presence in the Southwest.

The union’s executive board and leadership voted “overwhelmingly” to endorse Harris, UFW President Teresa Romero said in a statement shared with The Chronicle. The union did hear from other Democratic candidates before making their endorsement.

Huerta personally endorsed Harris earlier this year.

Harris has a history with the group. Romero cited the senator’s efforts in Congress to champion overtime pay for farm workers after eight-hour days, lobbying for state rules supported by the union and marching with the group at demonstrations in the past. Romero also noted Harris’ advocacy for immigrant rights, another cause for the group.

The union leaders were “inspired by her vision of a just and inclusive America, her personal story and the confidence and strength she has shown in the face of attacks from Donald Trump,” Romero said.

The endorsement comes at an opportune time for Harris. She has been falling in the primary polls for months, pulling resources out of other states to invest heavily in first-to-caucus Iowa.

Headed into the nominating convention in her home state, Harris is polling far behind the front-runners in California, a distant fourth to Massachusetts Sen. Elizabeth Warren, former Vice President Joe Biden and Vermont Sen. Bernie Sanders. Nationally, Harris has fallen to fifth place, behind Mayor Pete Buttigieg of South Bend, Ind. Anonymous campaign staffers have complained to Politico that her campaign lacks direction and a strategy to recover.

Sanders is also going into the weekend with a major labor endorsement, once again snagging the support of National Nurses United, who also backed him in 2016, and also winning over United Teachers Los Angeles. The independent senator announced the nurses’ endorsement Friday in Oakland.

Unions are a highly sought-after base of support in the Democratic primary. Labor groups have a strong field organization, making them potent grassroots allies for a campaign looking to build up support.

Harris said she was “humbled and honored” by the endorsement.

“These working families are the lifeblood of our economy and our communities, and this union has long been on the front lines in the fight for justice in America,” Harris said. “In this campaign, we are fighting injustices that leave too many Americans without access to health care, living wages and basic dignity, and together with my brothers and sisters in labor, I know we will win.”

The farmworkers’ union is a significant player, with strong support among Latino voters that will be key in the early primary states of Nevada and California, which has moved its primary up to March 3. The union endorsed Hillary Clinton in 2016.

California is a major agricultural state. The industry produces roughly $50 billion for the state, accounting for nearly 15% of the nation’s agricultural earnings, according to the state Department of Food and Agriculture.

Tal Kopan is The San Francisco Chronicle’s Washington correspondent. Email: tal.kopan@sfchronicle.com Twitter: @talkopan