Democratic vice presidential nominee Tim Kaine is predicting that the Roman Catholic Church may eventually change its opposition to gay marriage.

Kaine is a Roman Catholic as well as a U.S. senator from Virginia and a former governor of that state. He told the Human Rights Campaign during its national dinner Saturday in Washington that he had changed his mind about gay marriage and that his church may follow suit one day.

"I think it's going to change because my church also teaches me about a creator who, in the first chapter of Genesis, surveyed the entire world, including mankind, and said, 'It is very good,'" Kaine said. He then recalled Pope Francis' remark that "who am I to judge?" in reference to gay priests.

"I want to add: Who am I to challenge God for the beautiful diversity of the human family? I think we're supposed to celebrate it, not challenge it," Kaine said.

While he pledged to fight for increased rights for lesbian, gay, bisexual, transgender and queer Americans, Kaine admitted that he had opposed gay marriage until 2005.

"For a long time while I was battling for LGBT equality, I believed that marriage was something different," he said. Virginia's lieutenant governor when state lawmakers pushed for a constitutional amendment to keep marriage between one man and one woman, he recalled speaking to amendment supporters who said they hoped LGBT people would feel so unwelcome that they would move out of Virginia.

"When I heard the proponents describe their motivations, it became clearer to me where I should stand on this," he said.

Voters approved the amendment in 2006. The U.S. Supreme Court legalized gay marriage in all states in June 2015.

Before introducing Kaine, Human Rights Campaign President Chad Griffin called Republican nominee Donald Trump the "gravest threat" the LGBT community has faced in a presidential election.