Democrats once dominated statewide elections for the influential post of agriculture commissioner. Now they’re hoping to win just one.

Jonathan Robertson was preparing to start the workday on his family cattle farm when a campaign ad in the race for agriculture commissioner of Kentucky flashed across his television.

He couldn’t hear the narrator, but he noticed that the candidate — the name was Shell, he believed — was shown on the screen baling hay and driving farm equipment.

“I haven’t heard anything about who’s running,” Mr. Robertson, 47, recalled a few hours later, stopping with his brother for the $5.99 lunch special at the Wigwam General Store in Horse Cave., Ky. “Who’s his opponent?”

Neither Mr. Robertson nor his brother, Josh, 44, knew who was in the race, but they had no doubt how they would vote: “I’m a straight-ticket Republican,” Josh said.

Democrats face daunting odds in races for the under-the-radar but vitally important position of state agriculture commissioner — and not just in Kentucky, where the two people competing on Nov. 7 are Jonathan Shell, a former Republican state legislator, and Sierra Enlow, a Democratic economic development consultant.

A total of 12 states in the South and Midwest elect their agriculture commissioners, who wield enormous clout on everything from regulating pesticides to containing animal disease outbreaks. Twenty years ago, Democrats held most of those seats; now, Republicans occupy all 12, even in states where Democrats have prevailed in other statewide contests for governor, attorney general and the United States Senate, like North Carolina, West Virginia and Georgia.

The reversal of fortune is part of a general decline of the Democratic Party in the South in recent decades. But it also reflects a concerted focus by Republicans on down-ballot races, where they are applying the party’s core message about free markets and government overreach to contests that in the past may not have been partisan political battlegrounds. The role of agriculture commissioner is a natural, said Kent Leonhardt, West Virginia’s agriculture commissioner, who chairs Ag America, an endeavor by the Republican State Leadership Committee to maintain the party’s control of the posts.

“Most people that come from a farm or rural community — they’re pretty conservative,” said Mr. Leonhardt, whose victory in 2017 ended a Democratic streak in the state going back to 1988.

In Florida, Nikki Fried’s background as a lobbyist for an agricultural industry that has become increasingly prominent around the country — cannabis — helped her become the most recent Democrat anywhere to win an agriculture race, by a razor-thin margin, in 2018. She said her party had overemphasized an urban agenda, and failed to do enough retail politicking beyond blue areas.

“You’ve got to show up,” said Ms. Fried, who was defeated in a primary for governor in 2022 and is now chair of the Florida Democratic Party. “These are wholesome, good Americans that want to look into your eyes and feel the sincerity that you genuinely understand their lifestyle.”

A Republican, Wilton Simpson, was elected easily in 2022 to succeed her as the state’s agricultural commissioner, garnering 59 percent of the vote.

While the duties of an agriculture commissioner vary by state, in all of them the position has evolved beyond just farming.

In Florida, the agriculture commissioner, one of four elected Cabinet members, runs the state’s concealed weapons program, manages its forest lands, fights wildfires and tackles consumer complaints. In Texas, the agriculture department runs school nutrition programs and licenses the hemp industry. In North Dakota, the commissioner is a member, along with the governor and the attorney general, of the state’s powerful Industrial Commission, which oversees oil permits, the Bank of North Dakota, and housing finance.

The post can be a springboard to national prominence. Rick Perry, a former governor of Texas; Senator Cindy Hyde-Smith of Mississippi and Representative James R. Comer of Kentucky are all former agriculture commissioners — and all Republicans.

Three states are electing governors and other state officials this year, but Kentucky is the only one with an open seat for agriculture commissioner.

Though the state leans Republican, a moderate Democrat, Gov. Andy Beshear, has a 66 percent approval rating in the state and is slightly favored to win re-election. Still, coattails are not expected.

“For Democrats, the main chance is re-electing Andy Beshear,” said Al Cross, director emeritus of the University of Kentucky’s Institute for Rural Journalism and Community Issues. “They’ve got to get that done first, before they can be strong enough to help down-ballot candidates.”

The state agriculture department employs roughly 220 people and commands an $80 million annual budget, making it the second biggest office in the state’s executive branch, behind only the governor’s office, said Ryan F. Quarles, the current commissioner, a Republican who is not running for re-election because of term limits.

“A lot of my job is playing defense when it comes to intended or unintended consequences of bills passed in Frankfort and in Washington, D.C.,” said Mr. Quarles, who ran for governor this year and lost in the Republican primary.

Mr. Shell and Ms. Enlow, both 35, have not interacted much — recently anyway — other than through participating in a forum moderated by Mark Haney, president of the Kentucky Farm Bureau.

Elected to the State House of Representatives in his mid-20s, Mr. Shell, a fifth-generation farmer, helped Republicans win control of the chamber in 2016 for the first time in nearly a century. Senator Mitch McConnell once hailed him as “one of the most important Republicans in Kentucky.”

Mr. Shell has tried to nationalize the agriculture contest, vowing to do battle “against radical liberal ideas that threaten our way of life” and to defeat President Biden, whose voter approval ratings in Kentucky are down to 22 percent.

In an interview at a fish fry for Attorney General Daniel Cameron, the Republican nominee for governor, Mr. Shell touted his friendships with Republican leaders in Frankfort and Washington, at a time when Republicans are proposing deep cuts to the $1.5 trillion federal farm bill, over the objections of Democrats. He opposed as elitism and overregulation the federal government’s effort to regulate pollution in millions of acres of wetlands, which was struck down by the U.S. Supreme Court in May.

“We’ve got people who want to affect how we farm that have never stepped foot on a farm, who have no understanding of it whatsoever,” he said.

No Democrat has served as the state’s agriculture commissioner since 2003, when Richie Farmer, a Republican, won the post in an open race despite having no background in agriculture. What he did have was to-the-rafters name recognition: he was a star on the University of Kentucky 1992 basketball team that almost upset Duke in one of the greatest games in N.C.A.A. tournament history.

Mr. Farmer’s two-term tenure as commissioner was marred by allegations of campaign finance violations, and he later served 27 months in federal prison for misappropriating public funds to benefit his family and friends. Still, voters did not hold Mr. Farmer’s transgressions against his party, and have since delivered landslide victories for Republican agriculture candidates — often by the biggest margins of the seven races for statewide office.

Ms. Enlow, a political neophyte, grew up cutting tobacco on her family’s farm in LaRue County. If elected, she would become Kentucky’s first female agriculture commissioner.

She has logged some 25,000 miles on the campaign trail in her white Chevy Blazer, and recently pitched her candidacy to the Kentucky Women in Agriculture. Calling herself a pro-business Democrat, she said in an interview that her party needs more candidates who, like her, “can code-switch” and “represent both rural and urban audiences.”

While Mr. Shell talks about wanting to expand international trade, fight federal regulations and “preserve our way of life for future generations,” Ms. Enlow speaks of wanting to increase the pay of agriculture employees, expand rural broadband and ensure a robust supply chain for medical marijuana, which was just legalized in the state.

“You need two things to be a successful ag commissioner: You need production agriculture experience, but then you need business experience,” she said during a tour of the Log Still Distillery in New Haven, Ky. The distillery is part of the Kentucky Bourbon Trail, with bourbon being another part of the state agriculture commissioner’s wide-ranging portfolio.

“There’s certainly nothing about Jonathan that says he’s going to be the person that can go into a corporate boardroom and to negotiate for a farmer,” she said of her opponent.

In interviews with rural voters around the state, many, like the Robertson brothers, said they had not heard of either candidate. A number of voters said they wanted a candidate who would loosen regulations and advocate for farmers.

In Pulaski County, near Daniel Boone National Forest, Adam Ping, whose farm, Ping Dairy, has won awards for its milk, said he would automatically vote Republican. He had a long list of grievances, mostly related to federal policy, like environmental regulations and the escalating cost to transport milk.

He said he supported a push to get whole milk back in schools.

“When the Democrats, and Michelle Obama, took it out of the schools, it hurt sales terribly,” he said as he watched his daughter and her boyfriend clean the farm’s milking parlor. “It’s just control, control, control.”

In Logan County, near the Tennessee border, John Halcomb, whose family grows corn, soybeans and wheat, hailed Mr. Quarles’ performance in the post. He praised Ms. Enlow as a similar problem solver, as opposed to Mr. Shell, who he felt was too partisan.

Mr. Halcomb, who has dabbled in local Democratic politics, lamented what he said was the Democrats’ tendency to ignore low-profile races.

“I find it extremely frustrating,” he said, as the sunset began to gild acres of soybean stalks. “At what point do you stand up and say, OK, maybe I should do it?”