WASHINGTON — The U.S. Supreme Court’s decision Friday legalizing same-sex marriage across the country has confronted the Republican Party with a choice: to rally the base by continuing to fight, or take the loss and move on.

Gay marriage is an issue where public support has grown with a speed unlike that seen on any other social question in modern history.

Opposition remains strong, however, among religious and social conservatives. That segment of voters is crucial to the Republican coalition and a key to victory in some of the early-contest states, including Iowa, South Carolina and much of the rest of the South.

The dilemma presented by the same-sex marriage ruling expressed itself almost immediately in the reactions from the party’s enormous field of declared and presumed 2016 presidential candidates. They ranged from defiant to pragmatic, apocalyptic to philosophical.

In each, there was a glimpse of how the candidates have mapped out their path to victory.

“I will not acquiesce to an imperial court any more than our Founders acquiesced to an imperial British monarch,” former Arkansas governor Mike Huckabee said. “We must resist and reject judicial tyranny, not retreat.”

Huckabee’s comments reflected his background as a Southern Baptist minister, but also the fact that he is basing his campaign strategy on winning the Iowa caucuses, as he did in 2008, on the strength of his dominance among evangelical voters.

In 2016, however, Huckabee can expect a strong challenge for that segment of the electorate. Among them is Sen. Ted Cruz, R-Texas, who told a rally in northwestern Iowa Friday that the court decision was “the very definition of lawlessness.”

Louisiana Gov. Bobby Jindal, an underdog who this week became the 13th formally declared Republican presidential candidate, predicted the decision “will pave the way for an all out assault against the religious freedom rights of Christians who disagree.”

Other Republican candidates, while criticizing with the ruling, expressed acceptance, and sought to refocus on other issues that were raised by the ruling.

“While I disagree with this decision, we live in a republic and must abide by the law,” said Sen. Marco Rubio, R-Fla. “As we look ahead, it must be a priority of the next president to nominate judges and justices committed to applying the Constitution as written and originally understood.”

Former Florida governor Jeb Bush struck a similar tone: “I believe the Supreme Court should have allowed the states to make this decision. I also believe that we should love our neighbor and respect others, including those making lifetime commitments. In a country as diverse as ours, good people who have opposing views should be able to live side by side.”

Such measured responses could play better in the first Republican primary in New Hampshire, as well as in the general election.

Controversial court decisions have sometimes served as a valuable political organizing tool for the right in the past.

“The decision by this Supreme Court to redefine marriage contrary to global and historical understandings of the word no more settles the national debate on marriage than the court’s Roe v. Wade decision over 40 years ago settled the national debate on abortion,” said Tim Head, executive director of the Faith and Freedom Coalition, an organization that mobilizes evangelicals in politics.

One difference, however, is that overall public opinion on abortion has remained relatively stable since that 1973 decision, with most people believing it should remain legal in some circumstances. So opponents have focused their efforts on chipping away at abortion availability, with such measures as parental consent laws and restrictions on facilities that provide the procedure.

There are almost no practical choices for unraveling what the court has done on same-sex marriage.

Wisconsin Gov. Scott Walker, who is likely to announce his Republican candidacy in mid-July, called the ruling “a grave mistake” and endorsed a constitutional amendment allowing states to define marriage.

But one of his 2016 rivals, Sen. Lindsey Graham, R-S.C., said that “given the quickly changing tide of public opinion on this issue,” there is virtually no chance that an amendment could win a two-thirds majority in Congress and ratification by three-quarters of the states.

Still, though gay marriage will almost certainly remain legal, there will be other battles around it.

Chief Justice John Roberts noted in his dissenting opinion that the opinion did not settle such questions as whether a religious college might provide married-student housing only to heterosexual couples, or a church-run adoption agency might decline to place children with same-sex parents.

The Republican reaction contrasted sharply with the jubilant response of several Democratic presidential candidates, who praised the decision and cast it as reflective of an evolving, more tolerant America.

As recently as the 2008 presidential election, both of the leading Democratic contenders – Barack Obama and Hillary Rodham Clinton – were publicly opposed to gay marriage.

But they and most other Democrats have since embraced such unions as a constitutional right. Clinton’s Twitter page on Friday featured the word “HISTORY” in rainbow colors.