Massachusetts Rep. Barney Frank on Wednesday cheered President Barack Obama's announcement in support of gay marriage.

Frank, who will marry his long-time partner Jim Ready in July before he leaves Congress, just last month called Obama's opposition to marriage equality a “problem.”

Obama on Wednesday told ABC News' Robin Roberts: “I've concluded that for me personally it is important for me to go ahead and affirm that I think same sex couples should be able to get married.”

“Last year, President Obama took a major step towards vindicating the rights of lesbian, gay, bisexual and transgender people to marry when he announced his refusal to defend the Defense of Marriage Act’s blatant discrimination against us,” Frank said in a statement.

“Today he has taken the next logical step to complete the process by expressing his support for our right to marry people of the same sex. I understand why a President facing a national election took some time in making this decision, and I believe that the fact that he first announced his repudiation of DOMA gave him a chance to assess the reaction to that. I know there are those who wish that elected officials would completely ignore public opinion – of course only in those cases where they do not agree with public opinion – but that is not a realistic course in a democracy for those seeking to get the authority from the public to govern.”

“This does not mean that the President’s decision today was entirely without some political risk, but I believe it will be clear in the days ahead that this will cost him no votes, since those opposed to legal equality for LGBT people were already inclined to oppose him, and that it will make it easier for us to mobilize the people in this country who oppose discrimination to help reelect him.”