Heather, left, and Jax Collins of West Jordan, Utah, join hundreds of other same-sex couples descending on county clerk offices around the state of Utah on Dec. 22 to request marriage licenses. A federal judge allowed gay marriage to continue in Utah. Last January, President Obama - who had opposed same-sex marriage just nine months before - called for marriage equality in his second inaugural address. (Photo: Francisco Kjolseth, The Salt Lake Tribune via AP)

A banner supporting Edward Snowden, who leaked top-secret documents about sweeping U.S. surveillance programs, is displayed in Hong Kong's business district on June 21. The former NSA contractor, now 30 and granted temporary asylum in Russia, said he set out to provoke a global debate. (Photo: Kin Cheung, AP)

Cody Park exhales a cloud of marijuana smoke after taking a hit on a bong at the first day of Hempfest in Seattle on Aug. 16. Residents in cities from Lansing, Mich., to Portland, Maine, voted in November to legalize the possession of small amounts of marijuana, following initiatives that passed the previous year in Colorado and Washington state legalizing recreational use of pot. (Photo: Elaine Thompson, AP)

Alex Robles joins dozens of sign-holding protesters at a rally against low wages for fast-food workers, in front of a Phoenix McDonald's on Dec. 5. The Occupy Wall Street protests are only a memory, but the economic inequality and suspicion of powerful financial interests that fueled it are now being felt in a resurgence of populism not seen in decades. (Photo: Ross D. Franklin, AP)

Sen. Ted Cruz talks to members of the media on Oct. 16 after Republican senators met to agree to a plan to end the government shutdown. Cruz, the Tea Party hero and freshman senator from Texas, could not be deterred in his push for a government shutdown in October that ended up damaging the GOP’s standing without winning policy concessions. (Photo: H. Darr Beiser, USA TODAY)

Like this topic? You may also like these photo galleries:

WASHINGTON — When 2013 began, nobody was seriously predicting the year would end with same-sex couples getting married in Utah, one of the nation's most conservative states.

Or that President Obama would be spending his Hawaiian holiday considering recommendations for the most extensive limits on government surveillance since the Sept. 11 attacks, thanks to a 29-year-old fugitive contractor who spilled secrets and helped spark a reassessment of the balance between security and privacy.

Or that progressives, libertarians, fiscal conservatives and Millennials would be joining forces across the country to legalize marijuana use, turn back mandatory minimum prison sentences and reconsider the four-decade-long war on drugs.

When it comes to policy and politics, the year just past has had its share of surprises. They will help shape what happens in the year ahead — from defining the Democratic and Republican parties for the 2014 midterm elections to determining just how far the federal government can go in routine surveillance of Americans.

Among the surprises of 2013 are what failed to happen. Remember the confident predictions that the 2012 election returns and a bipartisan desire to cultivate support among Latino voters meant immigration laws would be overhauled this year? Not so much, it turned out.

While legislation in Washington was stalled, however, sweeping trends were playing out through lawsuits in courts and referendums in states. For the first time, majorities of Americans favored allowing same-sex marriage and legalizing marijuana use. On these and other issues, public opinion and political momentum seemed to hit tipping points that accelerated the pace of change beyond what even activists had imagined 12 months ago.

Below, five surprising developments in the year that ended Tuesday.

1. Same-sex marriage: 'A Cinderella moment'

Last January, President Obama — who had opposed same-sex marriage just nine months before — called for marriage equality in his second inaugural address. In June, the U.S. Supreme Court struck down parts of the federal Defense of Marriage Act. And in December, a federal district judge declared that the ban on same-sex marriage in Utah, approved by voters in 2004, was unconstitutional.

Rising public support capped by the Supreme Court decision created "a Cinderella moment" for advocates of gay marriage in 2013, Yale Law School professor William Eskridge says. "It's the moment when Cinderella met her Prince Charming, and although the wedding date has not quite been set, this is now a marriage made in heaven." A Pew Research Center Poll found that Americans favored same-sex marriage 51%-42%.

In December, New Mexico became the 17th state (plus the District of Columbia) to allow same-sex marriage when the state Supreme Court ruled that marriage equality was guaranteed by the New Mexico constitution. The Utah decision followed the next day; that ruling is likely to be appealed to the U.S. Supreme Court. Three days later, a federal judge in Ohio found that same-sex marriages performed elsewhere should be recognized on death certificates, a decision that could lead to challenges to the state's ban on gay marriages.

Advocates of traditional marriage were hard-pressed to identify a victory this year.

In 2006, Eskridge co-authored a book titled Gay Marriage: For Better or for Worse?that included a generally accurate prediction of the sequence of states that would authorize same-sex unions, starting in the Northeast and on the West Coast and followed by the Great Lakes. The authors didn't venture to outline a likely timetable, though. "I will say the Utah ruling was a surprise," he says. "No one had predicted that."

2. Government surveillance: The Snowden effect

At his final news conference of the year, Obama promised "a pretty definitive statement" in January on proposals by a presidential commission to change the way the government gathers telephone and digital data on U.S. citizens and others. He said he wants to restore the public's faith that the right balance is being struck between intelligence gathering and privacy protections. "The environment has changed," he said.

Why now?

"The answer ... is definitely Edward Snowden," says David Cole, a Georgetown Law School professor and co-author of a book published this year titled Secrecy, National Security and the Vindication of Constitutional Law. "He showed us that the government's ability to track us went far beyond what most people thought possible." For the first time, a majority of Americans (53% vs. 43%) said the federal government threatened their personal rights and freedoms.

In recent weeks, there have been conflicting views of the constitutionality of the National Security Agency's data collection program, with a federal District Court judge in Washington calling it "almost Orwellian" and probably unconstitutional, and one in New York saying it was legal. The dispute is likely headed to the Supreme Court.

"The discussion reflects a growing recognition that the digital age has changed the calculus of privacy," Cole says. "The government now has the capability to learn more about us than most of our closest friends know, through digital data. The question we face going forward is whether privacy protections will be updated in the face of this new reality. I think it's probably the most significant civil liberties question of the next decade. And Edward Snowden put it on the map."

The former NSA contractor, now 30 and granted temporary asylum in Russia, said he set out to provoke a global debate. Viewed as a hero by some and a traitor by others, on that he has succeeded.

3. War on drugs: A truce

Residents in cities from Lansing, Mich., to Portland, Maine, voted in November to legalize the possession of small amounts of marijuana, following initiatives that passed the previous year in Colorado and Washington state legalizing recreational use of pot. U.S. Attorney General Eric Holder Jr. announced over the summer that the Justice Department wouldn't try to block those state laws, assuming certain safeguards were followed, even though they are at odds with federal drug laws. He also ordered prosecutors to sidestep mandatory minimum sentences when charging low-level drug offenders.

On Wednesday, the first legal recreational pot shops opened for business in Colorado.

A pendulum has swung since then-president Richard Nixon declared a war on drugs four decades ago and since alarm about the crack epidemic prompted passage in the 1980s of tough mandatory minimum sentencing laws. In 1969, Americans opposed the legalization of marijuana by an overwhelming 7-1. This year, 52% supported it (vs. 45% opposed), the first time a majority has done so.

Ezekiel Edwards, director of the ACLU's Criminal Law Reform Project, sees a "sea change" on attitudes toward marijuana legalization and the beginning of a broader trend on criminal justice issues, especially mandatory minimum sentences. "It's no longer just a progressive issue, and that's really important," he says. Human rights activists, libertarians and economists have joined the debate. Fiscal pressures have spurred some states, including conservative ones such as Texas and South Carolina, to reduce or eliminate prison sentences for non-violent offenders, many of them convicted of drug charges.

In December, Obama commuted the sentences of eight federal inmates who had been convicted of crack cocaine offenses and given long — sometimes life — sentences under mandatory minimum sentencing laws.

Public uproar? Almost none.

4. Democrats: Populist revival

The Occupy Wall Street protests are only a memory, but the economic inequality and suspicion of powerful financial interests that fueled it are now being felt in a resurgence of populism not seen in decades. It helped elect Bill de Blasio as mayor of New York — the most liberal mayor in the nation's biggest city in a generation — and undermine former Treasury secretary Larry Summers as a potential nominee to head the Federal Reserve.

Massachusetts Democratic Sen. Elizabeth Warren has emerged as the movement's hero, especially after she went to the Senate floor to propose increasing Social Security benefits — heresy to deficit hawks in both parties. The issue of income inequality is expected to be a theme in Obama's State of the Union address Jan. 28, and populist politics could shape the Democratic presidential contest in 2016.

"The economy has been growing for a while now, but much of the growth is headed straight for the top," says Jared Bernstein, a former economic adviser at the Obama White House who is now at a senior fellow at the liberal Center for Budget and Policy Priorities. "I do think there is a desire to see some more robust policies that connect to progressive ideas."

That includes a push to extend the long-term federal unemployment benefits that expired Saturday and to raise the minimum wage. While the federal bill is stalled in Congress, 13 states raised their minimum wages as of this week, and a dozen more are expected to consider increases in 2014.

"In the past six months, the last year, we're seeing this strain of populism that is about tackling the Big Guys," says Democratic consultant Doug Thornell, a former Democratic House aide. Activists on the Democratic left as well as the Tea Party right are "tapping into the frustration, the anger many Americans feel toward the people who are perceived as playing by a different set of rules — the big special interests, the big corporations — including the fact that Washington isn't working."

5. Republicans: Tea Party pushback

The Tea Party movement that erupted in 2009 and helped Republicans gain control of the House in 2010 has provided many of the foot soldiers and much of the energy in the GOP, including challenging Republican incumbents deemed too moderate. Tea Party hero Ted Cruz, the freshman senator from Texas, could not be deterred in his push for a government shutdown in October that ended up damaging the GOP's standing without winning policy concessions.

That spurred some establishment Republican leaders, big party donors and business interests to push back in more public ways than before. House Speaker John Boehner managed to win passage of a bipartisan budget deal in December over the objections of the most outspoken Tea Party members. "Frankly, I just think they've lost all credibility," Boehner told reporters.

"Frankly, Mr. Speaker, continuously making promises and then breaking them is how you lose credibility with the American people," Jenny Beth Martin, co-founder of a group called Tea Party Patriots, retorted, vowing not to back down. "Pitting your colleagues against their constituents is how you lose credibility with your conference. Not upholding conservative principles is how you lose credibility with the voters, who will find someone else if you are not willing to do your job."

At stake is the definition of the GOP. The party's civil war is likely to rage at least through the 2014 midterms. Seven of the 12 Republican senators running for re-election now face primary challengers who claim Tea Party backing — battles that could hurt the party's chances of regaining control of the Senate.

In 2010 and 2012, Tea Party candidates won contested Senate primaries in Colorado, Delaware, Indiana, Missouri and Nevada, only to lose general elections.

Most Republicans and most Tea Party supporters share a desire to elect conservatives, says Brad Dayspring, a spokesman for the GOP's Senate campaign committee, but there is an increasing willingness to challenge groups that he says care only about raising their own profiles. "In general, people have had enough of leaving seats on the board that we should have won."