Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

WASHINGTON – Democratic vice presidential candidate Tim Kaine on Saturday spoke about his evolution on the issue of same-sex marriage, and predicted that the Catholic Church would eventually change its views on the matter.

"My support for marriage equality now — my full, complete, unconditional support for marriage equality — is at odds with the current doctrine of the church that I still attend," Kaine said at a Human Rights Campaign dinner.

"But I think that’s going to change, too … And I think it’s going to change because my church also teaches me about a creator in the first chapter of Genesis who surveys the entire world including mankind and said it is very good, it is very good," he said.

"Pope Francis famously said, 'who am I to judge?' And to that I want to add: Who am I to challenge God for the beautiful diversity of the human family?" Kaine said. "I think we’re supposed to celebrate it, not challenge it."

Kaine’s deep Catholic faith has remained a tremendous part of his life, and when he ran for Virginia’s governor in 2005, he campaigned on opposing same-sex marriage.

Since then, he danced around the issue for several years and then ultimately publicly supported equal marriage rights for same-sex couples as Virginia’s senator in 2013.

Related: Clinton Regrets Calling 'Half' of Trump Supporters 'Basket of Deplorables'

Kaine said that while he signed an executive order soon after taking office as governor that barred discrimination in employment on the basis of sexual orientation, as a devout Catholic "I believed that marriage was something different."

"I knew gay couples as friends, in my neighborhood. I knew them to be great neighbors. I knew them to be great parents to beautiful kids. And I saw them struggle with antiquated and even hostile adoption laws,” Kaine said.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

"But I had a difficult time reconciling that reality with what I knew to be true from the evidence of my own life, with the teachings of the faith that I had been raised in for my entire life,” he said.

Kaine was the keynote speaker at Saturday’s annual national dinner for the Human Rights Campaign, which describes itself as "America's largest civil rights organization working to achieve lesbian, gay, bisexual, transgender and queer equality.”

Related: After Defining Trump, Clinton Tries to Redefine Herself

The senator told the crowd a story about how he "first became conscious" of LGBTQ issues as a student at the University of Missouri in the 1970s, where he was changed by his LGBTQ friends.

A student gay association had to file a lawsuit to be able to meet at the school’s student union. When the student organization eventually won and headed to the venue to hold their first meeting, Kaine said, “I wish I could say that the Mizzou students welcomed them and cheered for them and supported them.”

But that’s not what happened.

Instead, Kaine remembered, the students "threw rocks and bottles at these peaceful marchers who pertain the right to do what other student groups do. That was a moment of consciousness raising for me. I don’t know how anyone could witness a sickening incident like that and not be changed by it. And I was changed by it."

By 2006, Kaine campaigned against an ultimately successful ballot measure that ratified a state constitutional amendment that banned same-sex marriage. Kaine said his views on marriage started to shift after hearing the reasons given by supporters of the amendment, and after working with groups opposing the ban.

He said that his own family, particularly his three children “helped me see the issue of marriage equality as what it was really about, treating every family equally, under law.”

At the dinner, Kaine also brought up the shooting attack on the gay-friendly Pulse nightclub in Orlando in June. "For all the progress we made, it is still too dangerous to be living as an LGBTQ in this country,” he said.

Kaine’s speech at the dinner came on the same day that Republican vice presidential nominee Mike Pence spoke to the Values Voters Summit — a summit that describes themselves as a forum to “mobilize citizens across America to preserve the bedrock values of traditional marriage." GOP nominee Donald Trump spoke there Friday.

Kaine attacked both candidates on the issue, chastising them for not having an LGBTQ issues page on their website yet having a shirt for sale geared to the community.

Kaine also noted that Trump has said in the past that he would appoint Supreme Court justices that would reverse the high court’s decision last year that made same-sex legal nationwide.

Kaine also brought up the controversial "religious freedom" bill that Pence, Indiana’s governor, signed into law in that state in 2015, adding, "yet Donald Trump saw this and decided 'this is the person I want helping me govern this country.'"

"There are never moments for rest," Kaine added, referring to efforts like North Carolina’s controversial HB2 law, as well as discussions around conversion therapy and other issues.

But he was clear in how valuable he sees the community in his ticket’s chances of winning the White House.

"The LGBTQ community vote in so many of our battleground states can be the difference between victory and defeat," Kaine told the crowd.