CNN  — 

Philippine President Rodrigo Duterte has told a crowd he “used to be gay” before he “cured” himself.

The President – who is known for making colorful remarks – made the comment during a speech to the Filipino community while visiting Tokyo on Thursday.

After accusing his political opponent and vocal critic Sen. Antonio Trillanes IV of being gay, Duterte said he could sense he himself was also “a bit gay” while married to his ex-wife, Elizabeth Zimmerman. Their marriage was annulled in 2000.

Duterte went on to say that he was “cured” after meeting current partner Honeylet Avanceña.

“I became a man again! So beautiful women cured me,” Duterte said. “I hated handsome men afterwards. I now prefer beautiful women.”

Duterte has a history of making controversial and contradictory remarks about the LGBT community.

In 2016, Duterte called the US ambassador to his country a “gay son of a bitch” in a speech, prompting US diplomats to raise the issue with their Filipino counterparts in Washington.

In March the following year, Duterte said he told Filipinos in Myanmar he was against same-sex marriage, and that recognizing marriages other than those between a man and a woman wouldn’t be acceptable in Philippines, which is predominantly Catholic.

But later that year, he said the rights of the LGBT community would be protected during his presidency.

“There will be no oppression and we will recognize your importance in society,” Duterte said at an LGBT conference in Davao City in the Philippines.

CNN’s Doug Jones and Mitchell McCluskey in Atlanta contributed to this report.