Ted Danson revealed that the end of his hit NBC show "Cheers" paved the way for his romance with his wife of 28 years, Mary Steenburgen.

The 75-year-old actor played the lead character of Sam Malone in the long-running series, which aired from 1982 to 1993. On Friday, Danson reunited with co-stars George Wendt and John Ratzenberger and "Cheers" co-creators James Burrows, Les Charles and Glen Charles for a panel discussion about the show during the ATX TV Festival in Austin, Texas.

While discussing why "Cheers" ended after 11 seasons, Danson admitted that he was behind it. "In my defense, we’d all been talking for a couple of years [about ending the series]," the two-time Emmy Award winner said, according to People Magazine.

He then added, "Okay, sorry. It was me." 

"My life was a hot mess at the time, and if I had not stopped and gotten it together, I would never have met my wife," "The Good Place" star explained.

ted danson in cheers ted danson with mary steenburgen

Ted Danson revealed how the ending of "Cheers" led to his romance with Mary Steenburgen. (Getty)

Danson and Steenburgen met for the first time in 1983 when he auditioned for the role of her on-screen husband in the biographical drama romance film "Cross Creek." "I was married. He was married. That was not our moment," Steenburgen said of meeting Danson in a 2021 interview with People.

TED DANSON SAYS HE AND WIFE MARY STEENBURGEN ARE ‘MADLY IN LOVE’: ‘I’M HAVING THE BEST TIME'

The pair were reunited in 1994 when they co-starred as on-screen spouses in the adventure movie "Pontiac Moon." By that time, both had ended their previous marriages. 

Danson and his wife Cassandra Coates split in 1993 and Steenburgen divorced her husband Malcolm McDowell in 1990.

Cheers cast

The hit sitcom ran for 11 seasons from 1982 to 1993. (Photo by Aaron Rapoport/Corbis via Getty Images)

While working together on "Pontiac Moon," the two struck up a friendship. "I wasn't ready for anything like a relationship. We just kept working together and becoming better and better friends," Steenburgen told People.

Their friendship blossomed into love during a canoe trip with friends in Mendocino, California. "It was very magical," Danson told People in 2021. "We came back in love, to be honest, or I'll say smitten."

CLICK HERE TO SIGN UP FOR THE ENTERTAINMENT NEWSLETTER

In October 1995, they tied the knot during a ceremony in Martha's Vineyard, Massachusetts, that was attended by then U.S. President Bill Clinton and First Lady Hillary Clinton.

mary steenburgen ted danson

Steenburgen and Danson tied the knot in 1995 after co-starring in the adventure movie "Pontiac Moon." (Charley Gallay/Getty Images for Netflix)

After they married, the couple went on to work together in the TV series "Gulliver's Travels" and "Curb Your Enthusiasm" and the 2004 romantic comedy "It Must Be Love."

"I want as long as possible in my life with Mary," Danson told People. "I know it will have all of its hard parts, but I want to experience love in all those moments."

CLICK HERE TO GET THE FOX NEWS APP

In 2018, Steenburgen told People Magazine that she would "sign up for 100 more lifetimes" with Danson. 

"There's no hollow in my heart where I don't love him, or where I doubt this love," "The Book Club 2" star said. "There's no secret place where I say we weren't a thousand percent supposed to spend our life together."