Presidential candidates Michele Bachmann, Mitt Romney and Herman Cain said Monday that the rights of religious groups should trump the rights of gay and lesbian couples.

The three GOP candidates answered questions on Labor Day at the Palmetto Freedom Forum sponsored by the American Principles Project. Texas Rep. Ron Paul and former House Speaker Newt Gingrich also participated in the forum. Texas Governor Rick Perry canceled on the event at the last minute to return to Texas to deal with out-of-control wildfires which have destroyed nearly 500 homes.

Asking the questions were Iowa Representative Steve King, South Carolina Senator Jim DeMint and Robert P. George, founder of the American Principles Project and chairman emeritus of the National Organization for Marriage (NOM), the nation's most vociferous opponent of gay marriage.

George asked the candidates whether the federal government should step in to protect the rights of religious groups in states such as Illinois and Massachusetts where lawmakers have not exempted them from accommodating prospective foster and adoptive gay couples in a civil union or marriage.

(Related: Illinois Catholic Charities to appeal gay adoption ruling.)

Minnesota Rep. Michele Bachmann, the first candidate to speak, answered: “I believe in equal protection under the law. And this is clearly a situation where we have seen a disadvantage to children who are about to be placed either in foster care or in adoptive care. And again, I believe that is one more example why the rulings of activist judges acting outside the original intent of the Constitution are so very dangerous to the foundation of the country.”

George followed up with: “If a state Legislature refuses to make funding available on equal terms to those providers who as a matter of conscience will not place children in same-sex homes, should federal legislation come in to protect the freedom of conscience of those religious providers. Even if the discrimination comes not from the courts but from the Legislature.”

“Well, yes I do, because I believe that is a right that is guaranteed to every American under our Constitution and bill of rights,” Bachmann answered.

The second candidate, former Godfather's Pizza CEO Herman Cain, agreed: “No, because I believe in the First Amendment. So, the federal government should not be subsidizing any situation where it's discriminatory against any legitimate religion in this country.”

Gingrich and Paul were not asked the question, but Gingrich reiterated his call for a federal amendment banning gay marriage.

Mitt Romney, the former governor of Massachusetts, the first state to legalize gay marriage, said it was a “mistake” not to exempt religious groups.

“I believe in religious tolerance and religious liberty. And that means to me that we are not going to force people of faith to violate their faith in order to carry out their profession.”

“In my state for instance about half of the adoptions were being placed by Catholic Charities. They had to get out of adoptions, because they would not under their faith place children in the homes of same-sex couples. That's a mistake,” Romney said.