Rick Santorum has blasted presidential GOP nomination rivals Michele Bachmann and Rick Perry for their positions on gay marriage.

Santorum, a former senator from Pennsylvania, over the weekend addressed about 40 people at a campaign stop in South Carolina, where he said that his Republican opponents were inconsistent on the issue.

Minnesota Rep. Bachmann and Texas Governor Perry have said that states should be allowed to decide the issue of marriage but back a federal amendment that would limit marriage to heterosexual couples.

“They go out and say, 'but we're for the federal marriage amendment,' therefore they can appeal to both sides. They can say 'it's fine with me, and yet it's not fine.' Sort of like what Barack Obama does,” Santorum said during a Horry County GOP meeting.

Bachmann “said that states have the right to change the marriage law. And then in the last debate, she said states don't have the right to mandate insurance. I found that to be rather challenging, intellectually.”

Santorum added that he supports a federally uniform definition of marriage, MSNBC reported.

(Related: Rick Santorum says gay community waged jihad against him over gay marriage.)