The LGBT community once again has the backing of fairweather friend Rodrigo Duterte, after the Philippine president declared his support for gay marriage Sunday.

Best known for his bloody war on drugs, Duterte told an LGBT gathering in his hometown, Davao City, that he supported same-sex marriage and would seek to protect LGBT rights.

“I am for (same) sex marriage if that is the trend of the modern times. If that will add to your happiness, I am for it,” he said.

“Why impose a morality that is no longer working and almost passé? It’s leftover rice.”

The strongman, however, has a track record of flip-flopping on LGBT rights. While Duterte declared his support on the 2016 campaign trail for a law change to allow gay unions, he soon backtracked in March and said that couldn’t happen “because we are Catholics.”

Duterte has also used the issue of gay rights to attack Western countries that criticized his administration. In August of last year, he used a homophobic slur in Tagalog to refer to U.S. ambassador Philip Goldberg, and in September, he asked if the head of the country’s Commission on Human Rights was “gay or a paedophile” because of his focus on the killing of teenagers in Duterte’s drug war.

But, amid growing debate about changing the country’s marriage laws, he said his stance had changed. “I want gay marriage. The problem is we have to change the law, but we can change the law,” he said.

Duterte said he had two gay brothers-in-law and joked that he had questioned his gender identity himself as a young man. “When I was in high school, I did not know if I wanted to be a girl or a boy,” he said.

Duterte’s rediscovered support for gay rights — which will include appointing an LGBT representative to advise his government — puts him at odds with the Catholic Church, a powerful force in a country where more than 80 percent of the people identify as Roman Catholics. Earlier this year, the country’s bishops spoke out against any moves to recognize same-sex unions.