While gay members of the military now enjoy the right to marry openly, the House Armed Services Committee attempted to ensure on Wednesday that they won't be able to do so on military bases.

In a straight party-line vote, Republicans on the committee approved an amendment to the National Defense Authorization Act that would ban military bases from hosting marriages or "marriage-like ceremonies" between gay couples.

Supporters of the amendment attempted to frame the debate in terms of religious freedom, saying that service members who are anti-gay marriage are in danger of punishment for their views. They introduced a second measure requiring that the military "accommodate the conscience and sincerely held moral principles and religious beliefs of the members of the Armed Forces concerning the appropriate and inappropriate expression of human sexuality." That amendment, which also passed along party lines, included specific provisions preventing chaplains from having to conduct ceremonies contrary to their beliefs.

The issue of military chaplains being forced to perform same-sex marriages has been a popular rallying cry among religious conservatives since the repeal of "don't ask, don't tell." The military, however, already protects chaplains from doing so, leading Democratic lawmakers to say that the amendment was unnecessary.

At least one gay rights group agreed. Aubrey Sarvis, the executive director of the Servicemembers' Legal Defense Network, said in a statement on Wednesday that Rep. Todd Akin (R-Mo.), who sponsored the amendment on chaplains, was "trying to solve a problem that does not exist."

"There are already in place adequate protections for chaplains and service members in this area," he said. "No one in uniform is being required to go against their conscience, and no one is being punished for expressing their personal religious beliefs."

At other times, the debate took a more starkly theological turn. Rep. Austin Scott (R-Fla.) stated that "we who are Christians ... see the country moving in very much the wrong direction."

Akin also told fellow committee members that "the president has repealed 'don't ask, don't tell' and is using the military as props to promote his gay agenda."

Sarvis said that such statements prove that the amendments are simply meant to undermine the repeal of "don't ask, don't tell."

"Let's get to the heart of the matter. Mr. Akin and a few others wish to weaken implementation of 'don't ask, don't tell' repeal. The Pentagon, Congress and the American people have spoken on this, and Mr. Akin simply doesn't like the outcome," he said.

The amendments passed on the same day that President Barack Obama backed same-sex marriage in an interview with ABC News.