© Seth Perlman, AP In this Feb. 6, 2015, file photo, then-Congressman Aaron Schock, R-Ill., speaks to reporters in Peoria, Ill. Schock resigned amid questions about spending. Aaron Schock, the former Illinois Congressman who opposed gay marriage during his tenure, came out as gay Thursday on social media.

The ex-Congressman, who served in Congress for four terms — and was once a rising star in the GOP after being elected as the then-youngest Congressman at 27 — confirmed the legitimacy of his posts to the Peoria Journal Star, part of the USA TODAY Network.

Schock resigned from Congress in 2015 after lavish spending, and was later charged with defrauding the government to fund personal air travel and office renovations, including imitating the 20th century decor of the British upper class. Many said the renovations appeared to be inspired by the TV show “Downton Abbey."

Start the day smarter. Get all the news you need in your inbox each morning.

The charges were dropped last year.

He explained that while he was running for Congress in 2008, he “took the same position” on marriage equality held by John McCain, the Republican presidential nominee, also alluding to the fact that both Barack Obama and Hillary Clinton were opposed to gay marriage at the time.

“That fact doesn’t make my then position any less wrong, but it’s sometimes easy to forget that it was leaders of both parties who for so long wrongly understood what it was to defend the right to marry,” he said.

Given the choice now, he wrote, he “would support LGBTQ rights in every way.”

In his statement, which was posted concurrently on a personal website, he explained that his religious family has largely shunned him since finding out he was gay after images allegedly showing him at the Coachella Valley Music and Arts Festival were published last year.

“News broke of my weekend at Coachella. Pictures online made clear what I was en route to tell my mother in person,” he wrote. “I wasn’t welcome at home for Easter.”

Since then, he said, he continues to receive emails from family members “trying to sell” him on the widely-condemned practice of conversion therapy.

The response to his post was swift and largely severe.

“Aaron Schock's statement fails to acknowledge the years of hurt that his votes against hate crimes protections, the repeal of Don’t Ask Don’t Tell and more caused LGBTQ Americans,” wrote GLAAD in a tweet.

Rep. Sean Patrick Maloney, D-NY, tweeted that Schock “needs to own up to his misconduct in office & apologize to all who fought (over his opposition) to win him his new found rights," but said that he should be welcomed.

Schock, near the end of his letter, does express his gratitude to the activists who broke down barriers that he otherwise did not.

“I can live openly now as a gay man because of the extraordinary brave people who had the courage to fight for our rights when I did not,” he said.

Contributing: Chris Kaergard, Peoria Journal Star; The Associated Press. Follow Joshua Bote on Twitter: @joshua_bote.

This article originally appeared on USA TODAY: Former Illinois Congressman Aaron Schock who opposed gay marriage comes out as gay