Republican presidential candidate Donald Trump shared some kind words for Bill Maher, liberal host of HBO's "Real Time," even though the two have sparred in the past.

Asked about Jon Stewart, who stepped down from hosting Comedy Central's "Daily Show" in August, Trump said he was happy to see that the Fox News GOP presidential debate bested Stewart in the ratings on his final show. The two programs aired on the same day.

"I loved it," Trump said in an interview with the Hollywood Reporter. "I have no problem with Jon Stewart. But it's very interesting, I didn't do his show."

Trump went on to praise Maher. "I like Bill Maher, too," he said. "Bill Maher has been in a certain way very respectful of me. In fact, a couple of months ago, before the polls started coming out, he said, 'He's not goin' away.' Because he's a smart guy. He gets me. He understands me."

During the 2012 presidential election, Trump stirred controversy by repeatedly questioning whether President Obama, who was born in Hawaii, was a U.S.-born citizen. He also offered to donate a large sum of money to a charity if Obama would make his college transcripts public.

Maher mocked Trump in early 2013 by saying he would donate $5 million to a charity if the real estate tycoon could prove he was not the "spawn of his mother having sex with an orangutan."

Trump published his birth certificate and then filed a lawsuit against Maher for, he said, breaching the agreement.

Maher has, however, recently credited Trump for his aggressive campaigning since announcing his bid for the White House in June.

"Even though I don't agree with everything Donald Trump says by far, it is sort of refreshing to have a politician who isn't always walking everything back and who isn't completely pre-programmed," Maher in a recent interview with the Post and Courier. "That's his genius, he doesn't apologize for anything. He's the king of brushing things off his shoulder. And this is what's attractive about him, I have to say, as somebody who did a show called 'Politically Incorrect', who was always being criticized for speaking too honestly."