As of Thursday, the Republican primary for Kansas governor was a long way from being decided.

With thousands of provisional ballots left to be counted, it could take weeks for a final tally; meanwhile, a clerical error in Thomas County reduced Secretary of State Kris Kobach's lead over Gov. Jeff Colyer to just 91 votes.

While Kobach considered whether he would recuse himself from the vote-counting process in his own election, KCUR looked back to see how many other races for Kansas governor had been so close.

It turns out the hardfought race between Kobach and Colyer wasn't nearly as dramatic as the 1930 election with Dr. John R. Brinkley running as a write-in candidate against Republican Frank Haucke and Democrat Harry Woodring.

Some historians believe that election was stolen from Brinkley by a political enemy who happened to be the state's attorney general.

Brinkley, who everyone called Doc, is now infamous for a scheme in which he implanted impotent men with goat glands. Men would travel from around the country to his hospital in Milford (about ten miles north of Junction City) for the procedure. They could pick out their own goat from Brinkley's herd. (The procedure didn't work.)

Brinkley became a millionaire when he started radio station KFKB (Kansas First, Kansas Best) in the late 1920s. People would mail in descriptions of their ailments and, in a segment called "Medical Question Box," Doc would prescribe a medicine he invented. The scam: people could only fill their prescriptions at pharmacies where Brinkley had contracts to sell the medicine, and he had deals with drug stores all across the Midwest.

He owned a plane and a yacht, and he built a sewage system and a bandstand in Milford. He also sponsered the local baseball team, the Brinkley Goats.

“The late 1920s and early 1930s marked Dr. Brinkley’s high flight,” historian Francis Schruben wrote in Kansas History: A Journal of the Central Plains. “His manner became grandiose and flamboyant. His striking goatee and his piercing but friendly eyes caught and held attention.”

But his radio station, his medicine, his goat gland operation and his flamboyance didn't sit well with state regulators, and in 1930 the Kansas Board of Regulation and Examination (now the Kansas Board of Healing Arts) siezed his medical license. The Kansas City Star and Emporia Gazettee agitated against him, and the Federal Radio Commission (now the FCC) was ready to close down KFKB.

Credit Kansas Hisotrial Society Doc Brinkley became rich and famous for his goat gland operation, which he claimed cured impotency.

So Brinkley ran for governor.

“Certainly his reason for entering politics, I think, is pretty clear,” says Kansas historian Virgil Dean. "He wanted to be governor so he could reverse his own fortunes."

Because of his radio shows, Brinkley was wildly popular. If he was governor, Brinkley figured, he could replace the members of the medical board and save his license and his business. He ran as a populist at just the right time.

As Dean notes, “1930 is a really difficult year for the country. It’s a year after the (stock market) crash. The depression is setting in. The ability of opposition candidates to tap into that discontent is very real in Kansas and across the nation.”

A few weeks before the general election, Brinkley took off in his private plane to campaign as a write-in candidate. Some 20,000 people showed up at one stop near Wichita in late October. He also pounded home his populist message on KFKB.

Brinkley promised free school books, old-age pensions and a pond on every farm.

The 1930 race was one of the closest elections in Kansas history. With his write-in campaign, Brinkley got 29.5 percent of the vote; Republican Haucke got 34.92 percent; Democrat Woodring got 34.96 percent and became governor with a margin of just 251 votes.

Credit Kansas Hisotrial Society People came from all over the country to Doc Brinkley's clinic in tiny Milford, Kansas.

However, some historians believe the only reason Brinkley lost was a dubious legal decision by Attorney General William Smith, who was part of the legal team that had stripped Brinkley of his medical license earlier that year.

“A 1923 Kansas statute allowed voter intent, however a name was written in, to be used in determining a ballot’s validity," historian Schruben wrote in his 1991 article. "Nevertheless, Attorney General William Smith dictatorially ruled that separate tallies be kept for ballots” with other variations of Brinkley’s name.

If the ballot didn't read J.R. Brinkley, it was essentially tossed out.

Brinkley never demanded a recount. Some historians speculate that he didn't want to spend the money even though he had plenty of it.

Brinkley ran again in 1932 as an independent. Alf Landon beat him and Woodring in the three-way race — but Brinkley still got 30 percent of the vote.

Brinkley ran against Landon in the 1934 Republican primary but was trounced. After moving his clinic and radio statio to Del Rio, Texas, he contemplated a run for U.S. Senate in his new home state but decided against another political campaign.

Woodring, after his single term as governor, went on to be Franklin Roosevelt's Secretary of War. Landon ran for president in 1936 and lost in a landslide to FDR — he didn't even carry Kansas.

Brinkley declared bankruptcy after losing a 1939 libel trial in Texas. The IRS later investigated him for tax fraud and the Post Office open a mail fraud investigation. He died penniless in San Antonio on May 26, 1942.

Sam Zeff is KCUR's metro reporter. You can follow Sam on Twitter @samzeff.

Parts of this story were originally on an episode of Archiver, a history podcast series hosted by Sam.

Editor's note: This story was updated on Friday, after Kobach said he would recuse himself from the vote-counting process.