Washington (CNN) -- Moments after the U.S. Supreme Court ruled on a pair of same-sex marriage cases, the handful of Democrats considering running for president in 2016 stumbled over themselves in a rush of celebratory reaction, blasting out a salvo of congratulatory press releases and tweets.
Voting 5-4 in each of two decisions, the justices struck down part of the Defense of Marriage Act that denied federal benefits to same-sex couples and cleared the way for gays and lesbians to once again marry in California.
Former Secretary of State Hillary Clinton, whose husband signed DOMA into law in 1996, applauded the decision.
"By overturning the Defense of Marriage Act, the court recognized that discrimination towards any group holds us all back in our efforts to form a more perfect union," Clinton said in a joint statement with her husband, Bill Clinton.
Maryland Gov. Martin O'Malley called the rulings "a powerful step forward." New York Gov. Andrew Cuomo said the opinions were "groundbreaking."
Their responses make political sense.
Public opinion on same-sex marriage has shifted dramatically from the time President Clinton signed the bill into law almost 17 years ago, after the legislation was approved by overwhelming majorities in both the Republican-controlled House and Senate.
In 1996, just 27% of Americans said gay and lesbian marriages should be recognized by law, according to CNN polling. By 2007, the number had jumped to 40%.
Today, a majority of Americans -- 55% -- say that marriages between gays and lesbians should be recognized as valid, with 44% opposed. More than two-thirds of young people support same-sex marriage, a recent Pew survey found.
Democrats who support same-sex marriage are now playing on increasingly friendly political turf, a circumstance that prompted a raft of Democratic senators to reverse their positions on the issue earlier this year in quick succession.
"The battle lines are now clearly drawn for future elections," said Lis Smith, a Democratic consultant who advises O'Malley. "Democrats, like the majority of Americans, support freedom and equality. Republicans embrace the stale and exclusionary policies of the past. Like immigration and women's health in 2012, this is an issue that will haunt the Republican Party for years to come."
Meanwhile, the court's rulings Wednesday were met with something less than unbridled enthusiasm by the GOP political class.
"My interest in weighing in on this topic approaches zero," said one veteran Republican working on a 2014 Senate race when asked to opine on the cases.
The reason is clear enough: Republican tacticians understand that winning modern races often means surviving the obstacle course of a conservative-dominated primary before having to appeal to general election voters who, nationally, view same-sex marriage as a non-issue.
Republican leaders in Washington expressed dismay at the ruling, but seemed eager to wash their hands of a polarizing national issue that, thanks to the court's opinion on Proposition 8, will now be considered in state capitals instead of the corridors of Capitol Hill.
"A robust national debate over marriage will continue in the public square, and it is my hope that states will define marriage as the union between one man and one woman," said House Speaker John Boehner in a prepared statement.
The political fight over marriage is felt most acutely, perhaps, in Iowa, where three state Supreme Court judges were removed from the bench in 2010 in a recall election after they ruled in favor of same-sex marriage in the state.
Defending traditional marriage -- between one man and one woman -- has become an animating issue for Iowa's vibrant social conservative community since that initial ruling in 2009, and a litmus test for Republican candidates seeking their approval, either in contested primaries or in the state's presidential caucuses.
At the beginning of last year's GOP presidential primary fight, Rick Santorum narrowly won the Iowa caucuses with the backing of a dedicated network of pastors and home-school families who rallied to his side because of his furious opposition to abortion rights and same-sex marriage.
But other Republicans in Iowa say the party is consigning itself to minority status by failing to embrace the shifting opinions about marriage that Wednesday's court ruling seemed to ratify.
"We can't afford to create a litmus test for the party," said David Kochel, who steered Mitt Romney's presidential campaign in Iowa and said he was pleased with the ruling. "There are too many young people, and too many people who frankly care far more about other issues, and people in the liberty movement who simply have no problem with same sex-marriage. We have to maintain a kind of open-armed stance on this."
But Iowa Republicans seeking their party's Senate nomination in 2014 aren't quite jumping on Kochel's bandwagon. None of them cheered Wednesday's decisions. The one Senate candidate who did celebrate was Bruce Braley -- the likely Democratic nominee.
Sam Clovis, a suspender-wearing college professor and former talk radio host running for the Iowa seat, blasted the DOMA ruling and said it opens the door to "polyamorous" marriages between more than two people.
While Clovis acknowledged that being a modern-day opponent of same-sex marriage presents a political challenge for himself and other Republicans, he said conservatives are fed up with being attacked by the left for simply stating their principles on the matter.
"Every time you advance the notion that you are a conservative and that you believe in traditional marriage, you get hammered," Clovis said. "People who have strong beliefs have been silenced. You can't talk about it except among your own friends."
For Republicans, the same-sex marriage rulings were something of a Rorshach test, exposing the almost timeless fault line between the party's pragmatists and its ideologues.
For figures in the party's establishment like Kochel, the rulings were met with a sinking feeling that same-sex marriage is increasingly a settled matter for voters and a potent wedge issue that Democrats can exploit for political gain in battleground states and in national elections.
Statements from the establishment wing of the party Wednesday were either risk-averse or nonexistent.
Republican National Committee Chairman Reince Preibus issued no comment on the ruling. Senate Minority Leader Mitch McConnell dodged a question about it. Wisconsin Rep. Paul Ryan said he opposes same-sex marriage but called for "respect," "civility" and "understanding" as people work through their "honest disagreements."
Most of the Republicans considering presidential bids in 2016 proceeded with caution, aware that their statements will likely be revisited if they ever become the party's standard-bearer in a general election.
Florida Sen. Marco Rubio issued a nearly 500-word commentary explaining his opposition to same-sex marriage.
But for outspoken conservatives who tend to get rewarded in Republican primaries, the opinions were greeted with fury -- general election consequences be damned.
Santorum, who is expected to make another play for the White House in 2016, attacked the "activist judges" on the court. Texas Sen. Ted Cruz, a freshman senator who harbors obvious national ambitions, called the rulings "a regrettable overreach against the will of the people."
These harsh denouncements had the added benefit of stoking outrage among family values conservatives around the country who contribute financially to their causes.
The mood was similar among Republican candidates further down the ballot, who are running in gerrymandered House districts where winning a GOP primary is the only victory that matters -- providing little political incentive to side with gays and lesbians.
Take this year's special election in Alabama's ruby red 1st Congressional District, where former state Sen. Bradley Byrne, a front-runner for the seat, wasted little time in hammering the court. "I am disappointed in today's decision, but know that Alabamians stand strong in supporting our states' right to define marriage without intrusion from the federal government," Byrne said.
In Byrne's hometown of Mobile, as in the rest of the South, there is less appetite for same-sex marriage than in other parts of the country.
In the Northeast, 63% of Americans favor legal rights for same-sex couples, according to a recent CNN poll. In the West, 58% of Americans say the same. But in the Midwest, the number of people who approve of same-sex marriage is 51%, and in the South, it's 49%.
Those also happen to be regions where Senate Democrats find themselves in potentially difficult re-election fights -- suggesting that while opinions about marriage may buoy Democrats nationally and in swing states, the issue is more perilous for the party in places such as Louisiana, North Carolina and Arkansas, where incumbent Senate Democrats will be on the ballot next year.