On the same day that President Obama threw the weight of the White House in support of gay marriage, defense lawmakers in the House banned the practice from taking place on U.S. military bases.

Members of the House Armed Services committee voted to include the measure by Rep. Steve Palazzo (R-Miss.) into the panel's version of the fiscal 2013 defense authorization bill late Wednesday night.

ADVERTISEMENT

The measure, which prevents "marriage or marriage-like ceremonies" between same-sex couples from taking place at American military bases, was approved by a 37 to 24 vote along party lines.

Republican panel members also approved language to protect military personnel from reprisals for expressing "their moral principles and religious beliefs... concerning the appropriate and inappropriate expression of human sexuality."

That amendment, sponsored by Rep. Todd Akin (R-Mo.) was approved by a straight party-line vote of 36 to 25.

Committee members did not specifically mention Wednesday's White House comments on gay marriage during the debate on the Palazzo and Akin amendments.

However, the shift in the administration's position on the issue undoubtedly contributed to the spirited exchange between panel members.

After years of “evolving” on the issue, Obama said Wednesday that he had concluded “personally” that same-sex couples should be able to get married.

He said he reached the conclusion after years of conversations with friends, family and neighbors, as well as with members of his staff who are in same-sex relationships, the president said in an interview with ABC's Robin Roberts.

“At a certain point I’ve just 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,” Obama said.

In the run-up to the Palazzo and Akin votes, committee members on both sides traded barbs on the necessity of the amendments or whether they would end up doing more harm than good within the military's ranks.

"The president has repealed 'don't ask, don't tell' and is using the military as props to promote his gay agenda," Akin said Wednesday while defending his amendment.

Reps. Rob Andrews (D-N.J.) and Susan Davis (D-Calif.) argued the amendments were unnecessary, since the Pentagon already had anti-discrimination rules in place. Andrews argued passage of the amendments would violate the constitutional mandate separating church and state.

Andrews and Rep. Loretta Sanchez (D-Calif.) suggested the amendments could incite harassment or possibly violence against gay or lesbian members of the military.

Akin defended the amendments, noting there was no protection for U.S. military members who are opposed to openly gay or lesbian members of the military and express those opinions openly. "This thing cuts both ways," he said.

However, the most heated exchange came between Sanchez and Rep. Austin Scott (R-Ga.). During the debate, Sanchez quoted passages from the Bible while attempting to explain a scenario where the Akin amendment could spur anti-gay sentiment in the military.

That comment drew the ire of Republican members of the committee, who demanded further explanation on which biblical passages defended anti-gay sentiments.

When Sanchez asked Scott if he would yield his time so she could further explain her position, Scott surprisingly shot back" "I am not yielding any more time to you. I have heard enough."

Obama’s public statement and the House Defense committee's measures follow Vice President Biden’s unexpected declaration on Sunday that he is “absolutely comfortable” with gay marriage.

The administration's shift also comes on the heels of an overwhelming vote in swing-state North Carolina defining marriage as legal only between a man and a woman, and comes just days after Obama held his first official campaign rallies.