Jason Reed / Reuters

The Supreme Court’s decision to strike down the Defense of Marriage Act last week is opening a rift at the highest levels of the Republican Party, as potential presidential candidates try to balance its increasingly marginal position on gay rights with the tectonic shift in public opinion toward marriage equality.

Possible presidential hopefuls have carefully staked out different and sometimes muddled stances on marriage, with some offering measured responses to the court’s ruling, others downplaying the issue and a third group doubling down on the GOP’s long-held social conservatism.

“As a country, we can agree to disagree,” Kentucky Senator Rand Paul told ABC News after the ruling. “That’s kind of where we are as well. The party is going to have to disagree on some of these issues.” But days later he changed his tune in a visit to South Carolina, an early 2016 primary state where ambivalence on gay marriage doesn’t play well. “If we have no laws on this, people will take it to one extension further—does it have to be humans?” Paul joked to conservative broadcaster Glenn Beck.

For many Republicans, the challenge will be to adopt a stance on marriage that satisfies conservatives without alienating socially moderate swing voters. “I appreciate that many Americans’ attitude towards same-sex marriage have changed in recent years,” Florida Senator Marco Rubio said in a carefully worded statement after the ruling. “I respect the rights of states to allow same-sex marriages, even though I disagree with them. But I also expect that the decisions made by states like Florida to define marriage as between one man and one woman will also be respected.”

Similarly, New Jersey Governor Chris Christie denounced judicial meddling such as the court’s decision as “incredibly insulting” to the bipartisan congressional majorities which passed the DOMA. Like Rubio, Christie argued the issue should be decided by the voters of individual states and their elected representatives. “If the people of New Jersey want to amend our Constitution in order to make same-sex marriage legal and permissible in the state they have every right to do it, and the only people who can give them that opportunity is the New Jersey State Legislature,” he said. “I’d vote against it when I went into the ballot, but I wouldn’t object to it.”

As Paul, Rubio and Christie tried to carve out a politically tenable position, other Republicans have just declined to address the issue. “I haven’t studied their decision,” said Ohio Governor John Kasich. “As I think you all know, I believe in the traditional sense of marriage…I don’t have any more to say than that.” A spokesman for Wisconsin’s Scott Walker told reporter David Catanese that the state’s economic turnaround was “his only priority.” Louisiana Gov. Bobby Jindal has also stayed out of the fray.

Then there were the likely presidential contenders who courted the segment of the base whose signal issues are social. Rick Santorum, who surfed a wave of evangelical support to a runner-up finish in the 2012 race, said he was “very disappointed” with the decision, and vowed to “fight for a definition of marriage that gives children their birthright, a mom and a dad, and our country the best chance for a great future.”

But Santorum is more a relic of the GOP’s past than a glimpse of its future. A belief in traditional marriage has been one of the GOP’s guiding principles since the genesis of the gay rights movement. The party platform, adopted at the 2012 convention, calls the “court-ordered redefinition” of marriage an “assault on the foundations of our society.” And while the party is often racked by intramural squabbles over issues like foreign policy or immigration, its rejection of gay marriage has, until recently, been inviolable.

This is now changing. Republicans like Ohio Senator Rob Portman, former Florida governor Jeb Bush and Alaska Senator Lisa Murkowski have joined a growing number of Americans to express their support for same-sex marriage, though they have couched their support for gay marriage in the conservative language of federalism. In March, joining a wave of Republican elites urging moderation on marriage, Bush said he believes states should decide whether to allow gay marriages. He also faced down an evangelical confab in Washington last month to argue that “ families don’t look all the time like they used to, and that’s okay.”

To a degree, the careful jockeying mirrors the evolutionary state Democrats were at during 2008 race, when Hillary Clinton and Barack Obama were debating the finer points of civil unions. At that point both opposed same-sex marriage; since then, the Democratic Party’s elected officials have undergone a swift and total transformation. It is difficult to imagine a serious Democratic contender opposing gay marriage in the years ahead, now that the party has enshrined support for marriage equality into its platform. Obama completed his “evolution” on the issue last year after Vice President Joe Biden announced his own support for gay marriage. When former Secretary of State Hillary Clinton endorsed same-sex marriage in March, a month after leaving the Obama administration, she became the last of the top-flight 2016 contenders to come out in support of the concept.

Given the shift in public opinion, many top Republicans are trying to at least minimize the damage the issue can inflict. “The smart candidates will shove this as far down on the issue list as fast as they can,” says Rick Wilson, a Republican campaign consultant in Florida. “It only cuts against us.”