Washington (CNN) Former Republican Rep. Aaron Schock of Illinois on Thursday came out as gay in a statement posted to his Instagram.

"I am gay," Schock wrote. "For those who know me and for many who only know of me, this will come as no surprise."

Schock, who was elected to four terms in Congress, wrote about growing up in the rural Midwest in a family "centered in a faith and its particular traditions." He described coming out to those close to him, and said it was "unwelcome news to every single person in my family."

While representing Illinois' 18th Congressional District, Schock opposed same-sex marriage and voted against the repeal of the "don't ask, don't tell" policy that barred gay men and women from serving openly in the military.

"In 2008, as a Republican running in a conservative district, I took the same position on gay marriage held by my party's nominee, John McCain. That position against marriage equality, though, was also then held by Hillary Clinton and Barack Obama as well," Schock wrote.

Read More