A DEVASTATED Barbara Walters is demanding that her troubled daughter enter rehab after a DUI bust!

Sources say the 83-year-old TV legend – who recently announced she’s retiring next summer – flipped out after her daughter Jacqueline Danforth and boyfriend Dennis Pinkham were arrested in Florida. Cops pulled Jackie, 44, over on suspicion of DUI and say they found marijuana and a pot pipe in Pinkham’s pocket.

Now in a shocking twist, The ENQUIRER has learned that Jackie’s former marriage to a fishing guide blew up after she started an affair with Pinkham!

“Jackie ditched my son Mark and went off with this Dennis guy,” her ex-father-in-law Chris Danforth told The ENQUIRER.

“Mark was blindsided. He thought they were happy. It was a bad breakup, and the divorce broke Mark’s heart.”

According to a police report, Jackie’s blood alcohol level was 0.218 – more than twice Florida’s legal limit of .08 – when she was arrested in Naples, Fla., on May 19.

“Jackie called Barbara from jail right after she was arrested,” a source told The ENQUIRER.

“Barbara was beyond upset and demanded that Jackie get herself into rehab immediately.

“She’d hoped that Jackie’s cheating on Mark and the end of their marriage would stay quiet. Now her arrest has dragged it all into the open.”

Sadly, it wasn’t the first brush with booze and drugs for Jackie, who was adopted by Barbara and her second husband, Broadway producer Lee Guber, in 1968.

In a 2004 interview, she admitted to using Quaaludes, Valium, meth and pot as a teenage runaway. When Barbara finally tracked her down, she had Jackie placed in a drug intervention program in Idaho.

While the troubled teen turned her life around, “now it looks like Jackie has relapsed,” said the source.

“Barbara was looking forward to a peaceful retirement, but she’s found herself in another desperate struggle to save her daughter.”