Kentucky Republicans are fighting over a nominee to challenge the Democratic governor, with a longtime Mitch McConnell ally squaring off against a wealthy former Trump administration ambassador.As he spoke to about a dozen voters in a dimly lit Mexican restaurant on the outskirts of Louisville, Daniel Cameron, Kentucky’s popular attorney general, explained how he viewed the tightening battle for the Republican nomination for governor.“Some folks in this race have been running on ads, and I’ve been running on a record,” said Mr. Cameron, who has long been seen as a rising Republican political talent and is a close ally of Senator Mitch McConnell. He was taking a clear swipe at his top rival, Kelly Craft, a former ambassador to the United Nations in the Trump administration who is married to a coal billionaire and has pumped more than $4.2 million into TV advertising.About 50 miles south, in a packed room at Jeff’s Food Mart in Campbellsville, Ms. Craft was not shy about wielding her wealth as a political weapon.“This may be one of the most expensive gubernatorial races in this cycle, and I have the personal resources,” she said.The unsettled race and escalating hostilities are unwelcome developments for Kentucky Republicans as they search for the strongest nominee to bring down Gov. Andy Beshear, a Democrat whose party loyalties in a crimson state have not stopped him from becoming one of the nation’s most popular governors. Even Republicans concede that he will be difficult to beat in November, and the contest has quickly become the most closely watched statewide election remaining this year.Ryan Quarles, the agricultural commissioner, has campaigned aggressively in rural stretches of the state.Pool photo by Timothy D. EasleyThe Republican primary on May 16 is pitting two pillars of the state’s party apparatus, Mr. Cameron and Ms. Craft, against each other, with a third, well-liked Republican, Ryan Quarles, the agricultural commissioner, acting as an amiable wild card. Polling has been scant, though the few public surveys suggest that Mr. Cameron’s once-dominant lead is shrinking.This churning political mixture has largely frozen the party and its major supporters in place. No one wants to be on the wrong side of the Craft family, collectively one of the biggest Republican donors in the country. And few are eager to damage Mr. Cameron, with his ties to Mr. McConnell, his early endorsement from former President Donald J. Trump and what some in the party view as his potential to rise to powerful positions within the G.O.P.It is not total war: The divisions fall short of the infighting between far-right and establishment candidates that consumed Michigan and Pennsylvania Republicans last year. Instead, the Kentucky Republicans, broadly similar in ideology, are jockeying for conservative primacy on issues like the border, education and vaguely defined “wokeness,” maneuvering that resembles the early contours of the Republican primary for president.The closeness of the race and the negative tone of the ads have caught many by surprise in Kentucky.When Mr. Trump endorsed Mr. Cameron last June, the attorney general seemed poised to cruise to the nomination. He is the first Black attorney general in Kentucky history, and the first Republican to hold the post in about 70 years, with strong name identification and rising political celebrity that stem in part from his prime-time speech during the 2020 Republican National Convention.Ms. Craft did not enter the race until four months after Mr. Cameron’s announcement. On Wednesday, she explained to voters in Campbellsville that she had “waited to get in this race because I didn’t see anybody that could get the job done.”Soon after in December, Ms. Craft began an aggressive ad campaign, airing a mix of biographical spots to help increase her name recognition and numerous ads attacking Mr. Cameron. Commonwealth PAC, a super PAC supporting her candidacy that is partly funded by $1.5 million from her husband, Joe Craft, has aired exclusively negative ads against Mr. Cameron, according to AdImpact, a media tracking firm.Mr. Cameron greeting supporters at a Lincoln Day dinner in Guston, Ky., last week. The scarce public polling in the race suggests that his advantage has diminished. Jon Cherry for The New York TimesOne of the ads from Commonwealth PAC sought to tie Mr. Cameron to Alvin L. Bragg, the Manhattan district attorney leading the indictment of Mr. Trump, by quoting them both as supporting a bail overhaul. Beyond that, they share little in common — other than being Black law enforcement officials.In an interview last Tuesday, Mr. Cameron called the ad “laughable on its face.”He added, “I hope that Kelly Craft, once this primary’s over, will decide to spend some of that money helping me when I’m the nominee.”Ms. Craft defended her ads in an interview last Wednesday.“What I’m focused on is pointing out truths and giving Kentuckians facts,” she said. “So you may think it’s negative. I’m looking at it as telling the truth.”From December to late March, Ms. Craft, with help from her allies, was the only major candidate for governor with ads broadcast across Kentucky’s seven media markets.Mr. Quarles, who has spent slightly less than his two main competitors, has aggressively campaigned in rural stretches of the state, racking up more than 235 endorsements from local officials, including county judges, mayors and magistrates.His first ad, released on Wednesday as part of an initial six-figure purchase, highlights how he “grew up on my family farm in rural Kentucky.” Known in Frankfort for a decade, Mr. Quarles has capitalized on longstanding relationships for support.“A celebrity versus the resources versus old school,” said Scott Jennings, a Republican operative in the state, summing up the contest between the three top contenders.“Cameron is the front-runner, but there’s no doubt this race has gotten close and remains fluid,” added Mr. Jennings, who like many other Republicans has remained neutral.Indeed, many of the major forces in Kentucky Republican politics are staying on the sidelines. Mr. McConnell has not issued an endorsement and does not plan to do so, according to people close to him, and his vast network of operatives in the state has largely not picked sides. Senator Rand Paul is also not endorsing a candidate. And most of Kentucky’s congressional delegation — except Representative James Comer, who endorsed Ms. Craft — has stayed out of the race.For Republicans, part of the challenge of defeating Mr. Beshear has to do with the G.O.P. dominance of the state. Republicans hold supermajorities in the Legislature, making it difficult for the governor to wield much power without a veto. Yet that has kept Mr. Beshear from contentious showdowns with Republicans on hot-button issues, and has let him focus on using state resources to help repair infrastructure and improve the economy.Lacking the money of Ms. Craft, Mr. Cameron has tried to emphasize his endorsement from Mr. Trump. In an eight-minute interview, Mr. Cameron mentioned the endorsement four times.He is quick to point out that Ms. Craft, whose stump speech focuses heavily on her tenure in the Trump administration, does not have the former president’s backing.“Despite what some others might tell you,” Mr. Cameron told a crowd at a Lincoln Day dinner in Meade County, “President Donald J. Trump has endorsed this campaign for governor.”On the issues, Mr. Cameron and Ms. Craft have little daylight between them. Education is a central tenet, with both pledging to fire the current commissioner of education, and deriding what they call a “woke” agenda in schools. Both embrace nationalized issues like the Southern border despite living in a state nearly 1,000 miles from Mexico.Ms. Craft speaking last week at Jeff’s Food Mart in Campbellsville, Ky. She has often focused on education, and has expressed full-throated support for the coal industry.Jon Cherry for The New York TimesThey have also made combating the opioid epidemic, and fentanyl in particular, key planks. Mr. Cameron often notes that his office is working to bring in just under $900 million from settlements to address the drug scourge and empower law enforcement. Ms. Craft has told the emotional story of her daughter’s struggle with addiction and has called for harsher penalties for drug dealers.Ms. Craft also offers ardent support to the state’s coal industry, and her placards pledge to “beat back Joe Biden’s E.P.A.”In his remarks in Shepherdsville last Tuesday, Mr. Cameron highlighted his many battles with Mr. Beshear.“When Governor Beshear decided to shut down churches, I went into federal court and, after nine days, got churches reopened in Kentucky,” Mr. Cameron said, referring to early pandemic regulations.At her stop in Campbellsville, Ms. Craft held aloft a copy of “All Boys Aren’t Blue,” a memoir about growing up Black and queer, as an example of books she wanted banned in the classroom.“We’ve got to take the woke out of the schools,” she said.John Allen, 74, of Taylor County, who came to see Ms. Craft at Jeff’s Food Mart, spoke approvingly of such positions.“What she said in her speech today is exactly the way I feel,” he said. “I’m tired of all this woke agenda stuff. I’m just tired of it. And I think everybody else is, too, and I’m tired of somebody telling me what I can say and can’t say. They’ve got to understand what the First Amendment really is.”But some voters are still making up their minds.Rose Greene, 62, of Meade County, said she had initially leaned toward Mr. Cameron over Ms. Craft. She had friends who had gone to church with him, and she liked his economic positions.“But then I’ve been seeing her commercials,” she added. More