Bill Maher and Bill O'Reilly.Maher - AP Photo/HBO, Janet Van Ham; O’Reilly - Paul Drinkwater/NBC/NBCU Photo Bank.

Bill Maher and Bill O’Reilly are distant cousins, the PBS series “Finding Your Roots” has discovered.

The revelations that such political polar opposites are related seems to shock the show’s host, Harvard University professor Henry Louis Gates Jr.

After Fox News Channel host O’Reilly is told he has a familial tie to another well-known personality, he turns a page in his ancestry book to see a photo of Maher, the liberal host of HBO’s “Real Time.”

"Oh, geez," he said. "You're going to have to put him on 24-hour medical watch. This ruins his career. This destroys him."

When Maher sees the O'Reilly picture in his book, he said: "It just shows you what a great place America is. Because we're about as opposite as you can possibly get."

The family ties were discovered through DNA testing their Y chromosomes, which are passed through male family lines.

It was discovered that both men share a common male ancestor from Kingdom of Breifne in Ireland, which was in place from the 13th through the 17th centuries, said CeCe Moore, the show's DNA consultant.

Separate autosomal DNA testing, which tracks descendants of both sexes, also indicates the men share an ancestor, dating back about 500 years, she said.

"We're all connected if you go back far enough," Moore said. "These two are a little bit more recent than most of us."

Tracing the two hosts’ paper trail of a family tree uncovered interesting descendants for both men.

One of Maher’s ancestors was a prominent New York union boss, while the first O'Reilly to come to the U.S. escaped the Irish potato famine at age 16 to come to New York and open a saloon.

The third season of “Finding Your Roots” begins on Jan 5. The episode featuring Bill Maher and Bill O’Reilly will air on January 12.

Here's Bill O'Reilly's reaction to the news:

H/T: The Associated Press.