The Rev. Rick Warren, pastor of Saddleback Church and author of the best-selling book The Purpose Driven Life, has reversed course on a proposed anti-gay bill in Uganda.

In recent weeks, Warren has refused to take a public stance on the legislation, which in one version would have prescribed execution for gay men and lesbians if they are HIV-positive or have a history of violating the law.

The legislation, which is favored for passage, is supported by Martin Ssempa, a Uganda pastor who has made appearances at Warren's Southern California megachurch. Warren distanced himself from Ssempa in October after the relationship was criticized, but refused to condemn the bill, saying “it is not my personal calling as a pastor in America to comment or interfere in the political process of other nations.”

But on Thursday, Warren released a video statement to Ugandan church leaders where he said “it is my role to speak out on moral issues,” and called the bill “unjust, extreme and un-Christian toward homosexuals.”

“Because I didn't rush to make a public statement some erroneously concluded that I supported this terrible bill, and some even claimed I was a sponsor of the bill,” he said. “You in Uganda know that this is untrue.”

“I oppose the criminalization of homosexuality,” he added.

Warren has become a lightning rod for criticism on anti-gay issues after he likened gay marriage to an incestuous relationship and polygamy in an interview with editor Steven Waldman and backed passage of Proposition 8, California's voter-approved gay marriage ban.

Despite a loud protest from gay bloggers and activists, Warren gave the invocation prayer at President Obama's inauguration in January.

While Warren condemns the bill in his video message to Uganda's clergy, he also makes it clear that he remains anti-gay: “We can never deny or water down what God's Word clearly teaches about sexuality. Let me be clear that God's Word states that all sex outside of marriage is not what God intends.” And then adds, “at the same time, the church must stand to protect the dignity of all individuals – as Jesus did and commanded all of us to do.”