It was a year of political surprises.

Republicans started 2022 predicting election season triumphs and ended it locked out of state government leadership positions, due in part to the U.S. Supreme Court's overturn of Roe v. Wade that prompted a surge of political engagement among Democrats.

State leaders discovered they had a record-breaking state surplus, but couldn't figure out how to work together to spend it. And in a move that left even some legislators shocked, Minnesota legalized THC edibles.

Here are some of the top stories of the year in Minnesota politics.

Not one, but two historic budget surpluses

The state government was flush with record-breaking levels of cash in 2022. Officials projected a historic $9.3 billion budget surplus in February, then nearly doubled that estimate in December to $17.6 billion.

Why does the state have so much money? It collected more tax dollars than projected, particularly through income and corporate taxes. It also spent less than expected, as public school enrollment fell and federal COVID aid helped keep health care expenses down.

Negotiations blow up at the Capitol

Gov. Tim Walz, the GOP-led Senate and DFL-controlled House had different ideas for how to use the surplus dollars during the last legislative session. State leaders landed on a deal that included $4 billion in tax cuts along with spending on education, infrastructure, health and human services and public safety. But the agreement fell apart amid election season politics, leaving billions on the table and adding to the latest surplus figure.

Leaders did pass laws that replenished the state's unemployment insurance fund and spent $500 million on "hero pay" for frontline workers.

Roe is overturned, but abortion access expands in Minnesota

Just weeks after Roe was overturned, creating a patchwork of abortion accessibility across the nation, a Ramsey County judge quietly issued a ruling that dramatically expanded the availability of abortions in Minnesota.

In one fell swoop, Judge Thomas Gilligan — citing constitutional protections for the procedure — struck down abortion restrictions such as a 24-hour waiting period, two-parent notification for minors and an informed consent requirement. It was a significant victory for abortion rights groups and bolstered Minnesota's newfound status as a haven for abortion in the Midwest.

Edibles become legal

In the final days of the 2022 legislative session, Minnesota lawmakers passed a proposal to allow Minnesotans 21 or older to buy THC-infused edibles and beverages that contain no more than 5 milligrams per serving and 50 milligrams per package. Cannabis advocates were surprised it got through the Legislature, given Senate Republicans' opposition to recreational marijuana legalization. After the law took effect in July, at least one top GOP legislator said he didn't realize the change would legalize edibles containing any type of THC.

The DFL wins big in the midterm election

Given historic midterm headwinds, as well as concerns about crime and inflation, most political pundits were predicting some losses for Minnesota Democrats on election night. The Legislature looked primed to flip to GOP control, and recent polling showed the attorney general and state auditor races to be either dead heats or trending toward Republican victories.

Instead, Democrats won everything — sweeping all the constitutional offices, holding onto the state House and unexpectedly winning back the state Senate by a single seat. Party leaders credited favorable new redistricting maps, anxiety over the future of democracy, and fury over Roe's reversal for their stronger-than-expected showing.