Country legend RANDY TRAVIS’ 18-year marriage is headed for divorce court – after his wife told pals she caught him cheating with his dentist’s wife, The ENQUIRER has learned exclusively.

Travis’ wife believes that the 51-year-old singer – who recently won his sixth Grammy for his "I Told You So" duet with Carrie Underwood – has been meeting Mary Beougher, a mother of two who’s also 51, for steamy sex trysts, sources say.

Randy’s much-older wife and longtime manager, 69-year-old Libby Hatcher, told pals she was devastated when she planted a spy camera on his tour bus that got video of him cheating with Mary.

"The whole thing sounds like a bad country song," a close family friend told The ENQUIRER.

"Randy owes his entire career to Lib. She’s heartbroken."

Libby became suspicious after Randy began flirting with Mary at her husband Dr. Ritchie Beougher’s ritzy Willow Bend Dental office in Plano, Texas, said the source.

"Ritchie was cleaning Libby’s teeth," said the source. "Randy and Mary took a walk outside."

Libby told pals that a short time later, an affair began when Mary flew to Oklahoma and hooked up with Randy on his tour bus in March, said the source.

Libby told the pals that she believes the two secretly met up again in April in Santa Fe, N.M., where Randy and Lib have a home.

The source says they also got busy at his Nashville, Tenn., condo in May.

"Lib planted a secret camera on Randy’s tour bus and caught him and Mary red-handed," the source said.

"It’s awful. Lib’s the one who made Randy famous. Now he’s throwing her away."

FIRST POSTED online: 7/22/10