Wisconsin voters will decide Tuesday who to send to their state’s Supreme Court, determining its ideological tilt in the most expensive judicial race in U.S. history.

The ostensibly non-partisan race pits liberal Janet Protasiewicz against conservative Daniel Kelly to replace an outgoing conservative justice who gave the court a 4-3 conservative majority.

At a debate Tuesday in Madison, Kelly, a former state Supreme Court justice who was appointed by then-Gov. Scott Walker, discussed issues like crime and redistricting with Protasiewicz, a Milwaukee County judge.

The off-year, down-ballot race has attracted widespread attention because of cases that could go before the court, including abortion, election maps and voting rules ahead of the 2024 election. A swing state, Wisconsin was won by President Joe Biden in 2020 and former President Donald Trump in 2016.

Both candidates said during the debate they would follow the law and the Constitution when it came to abortion. Protasiewicz criticized Kelly for being endorsed by anti-abortion groups and said she had been “very clear about my values to the electorate.”

“My personal opinion is that should be the women’s right to make the reproductive health decision, period,” Protasiewicz said. She’s been endorsed by pro-abortion groups including Planned Parenthood Advocates of Wisconsin.

Following the U.S. Supreme Court’s ruling overturning Roe v. Wade last year, Wisconsin’s 1849 abortion ban went into effect. The state is one of 13 where most abortions are banned. The state’s Democratic Gov. Tony Evers and Attorney General Josh Kaul filed a lawsuit to overturn the state’s abortion ban that could go before the court.

So far, $37 million has been spent on the race, a record that outpaces the $22 million spent on a pair of Illinois court seats in 2022, according to data from AdImpact, an ad tracking firm. Wisconsin is one of 23 states that elects its state Supreme Court justices.

Kelly was endorsed by Trump during his 2020 election, which he lost. He told NBC News he wasn’t looking for an endorsement from Trump this time around. “I’m not really looking for endorsements from political actors,” Kelly said.

The Wisconsin Democratic Party poured about $8.8 million into Protasiewicz’ campaign. She said during the debate that she was well aware of the amount of money the Democratic Party had contributed to her campaign and she would recuse herself from cases involving the party.