One of the most surprising results in the primary elections this week was in Tennessee’s 4th Congressional District, where Republican Rep. Scott DesJarlais weathered numerous scandals and was locked in a too-close-to-call race with his GOP challenger, who had pledged to bring “Tennessee values” back to Washington.

DesJarlais, who presented himself to voters in his first race in 2010 as a "doctor, not a politician," has touted his staunch opposition to abortion rights and his conservative values throughout his political career. But he was shadowed by allegations by his first wife in his 2010 race that he had physically intimidated her during their 2000 divorce.

Shortly after he was elected in 2012, the state Democratic Party released court transcripts in which he admitted to multiple affairs and having asked a lover to get an abortion, according to the Associated Press and the Almanac of American Politics.

Then in 2013, DesJarlais was reprimanded by the Tennessee Board of Medical Examiners for "unprofessional conduct" for engaging in a sexual relationship with two patients sometime between January 2000 and May 2000. He was fined $500 and did not contest the ruling.

DesJarlais, who had strong tea party support in his district, asked Tennessee voters to judge him as the man that he is today — highlighting the fact that he is happily remarried. He accused opponents of dwelling on the details of a divorce that occurred more than a decade ago.

In an unofficial tally reported by the Tennessee secretary of state on Friday, DesJarlais eked out a 35-vote lead over his Republican opponent, state Sen. Jim Tracy. But the secretary of state’s office cautioned Friday that the election results have not yet been certified by election officials in each county. Part of the uncertainty about the results stems from the fact that there is an unspecified number of provisional ballots that remain to be counted.

In the end the voters in the low-turnout Republican primary cared more about DesJarlais’ ideology, said Vanderbilt University political science professor John G. Geer. (The district showed its conservative makeup in the 2012 presidential race when Republican nominee Mitt Romney defeated President Obama by a 32-point margin; four years earlier GOP nominee John McCain beat Obama by more than 25 points).

“It’s an extremely conservative district that is aligned with DesJarlais’ opinions,” said Geer, adding that Tracy did not run an aggressive race. “Some people were just simply prepared to forgive [DesJarlais] even though he did something pretty bad."

Though the vote count in the Republican primary was not yet official, DesJarlais declared victory based on his 35-vote margin. He noted that Tracy raised three times as much money as he did in campaign contributions and asserted that voters had shown their faith in his ability “to continue to serve them effectively in Washington.”

“My campaign made it clear from the beginning we would run on my independent, conservative record and that is precisely what we did,” DesJarlais said in a statement. “While my opponent engaged in desperate and disgusting personal attacks, at the end of the day voters cared more about the job I have done in Congress.”

Tracy had argued that he was running for Congress as a conservative “to bring trust and [Tennessee] values” to the 4th Congressional District. On Friday night, he initially declared victory based on news reports that he was a few points ahead.

“We did it,” Tracy said, raising his fist in a victory gesture Thursday night in a video that was broadcast by WKRN-TV Nashville. “I want to thank my lord and savior Jesus Christ, without him nothing else is possible,” the state senator said.

The Tracy campaign then backtracked – posting thank-you messages on the state senator’s Facebook and Twitter feeds Friday that said they were eagerly awaiting the final outcome once the counting was completed and verified.

"I am thankful to all of the hundreds of volunteers who knocked on doors and made phone calls and talked to their neighbors on my behalf. We've had a great grass-roots effort and I am proud of the campaign we have run," Tracy said in a statement late Friday. "There are still ballots left to be counted in the Fourth District Republican primary as we go through the certification process."

Though the two candidates are separated by only a few dozen votes, there is no automatic recount in Tennessee as there would be in some other states. Under Tennessee law, the election officials in each of the 16 counties in the 4th Congressional District have until Aug. 25to count provisional ballots and certify their results.

At that point, if the losing candidate wanted to challenge the results, they would have five days to do so after the last county certified its count. The challenge could then be presented to the Republican State Executive Committee, which would decide whether a recount was necessary and who would pay for it.

The challenge must be resolved before Sept. 20,when ballots must be printed and mailed to military overseas, according to the Tennessee secretary of state’s office.

But Robert Jameson, DesJarlais’ campaign spokesman, said the congressman planned to turn his attention to his Democratic opponent Lenda Sherrell, a Monteagle accountant.

“We won the race and we are just going to stand by that until circumstances call for some sort of response,” Jameson said.