(Reuters) - A challenger to scandal-plagued U.S. Representative Scott DesJarlais on Monday conceded the Republican primary election in Tennessee, giving the physician a shot at a third term by 38 votes.

DesJarlais and Jim Tracy, a state senator, both had declared victory after the Aug. 7 election. After the unofficial count, DesJarlais had 34,793 votes and Tracy 34,755 but Tracy said would not contest the count.

"We have consulted with knowledgeable people and I have consulted with my family and, most importantly, I have prayed for guidance," Tracy said in a statement. "In the end, the decision of whether or not to file a contest was mine and mine alone."

DesJarlais, first elected to Congress in 2010, has been stung by revelations about his private life. He admitted last year to a state board that he had sexual relationships with two female patients in 2000.

"I want to thank you for once again putting your faith in my ability to serve you; I promise I will never take that trust for granted," DesJarlais said in a statement.

With Tracy's concession, DesJarlais will face Democrat Lenda Sherrell in the November general election.

Tracy said he was not willing to put the Republican Party, his staff, family, elections officials and the public through more weeks of litigation and uncertainty. Tracy said he would continue to serve in the state Senate.

Tracy technically has another day to challenge the result. The Tennessee secretary of state's office will begin preparing for the general election if he does not do so, spokesman Blake Fontenay said.

(Reporting by Tim Ghianni; Editing by David Bailey and Bill Trott)