MADISON, Wis. (AP) — The Democratic-backed candidate for Wisconsin Supreme Court defeated a challenger endorsed by President Donald Trump and billionaire Elon Musk on Tuesday, cementing a liberal majority for at least three more years.

Susan Crawford, a Dane County judge who led legal fights to protect union power and abortion rights and to oppose voter ID, defeated Republican-backed Brad Schimel in a race that broke records for spending, was on pace to be the highest-turnout Wisconsin Supreme Court election ever and became a proxy fight for the nation's political battles.

Trump, Musk and other Republicans lined up behind Schimel, a former state attorney general. Democrats including former President Barack Obama and billionaire megadonor George Soros backed Crawford.

The first major election in the country since November was seen as a litmus test of how voters feel about Trump's first months back in office and the role played by Musk, whose Department of Government Efficiency has torn through federal agencies and laid off thousands of workers. Musk traveled to Wisconsin on Sunday to make a pitch for Schimel and personally hand out to $1 million checks to voters.

Crawford embraced the backing of Planned Parenthood and other abortion rights advocates, running ads that highlighted Schimel’s opposition to the procedure. She also attacked Schimel for his ties to Musk and Republicans, referring to Musk as “Elon Schimel” during a debate.

Schimel’s campaign tried to portray Crawford as weak on crime and a puppet of Democrats who, if elected, would push to redraw congressional district boundary lines to hurt Republicans and repeal a GOP-backed state law that took collective bargaining rights away from most public workers.

Crawford’s win keeps the court under a 4-3 liberal majority, as it has been since 2023. A liberal justice is not up for election again until April 2028, ensuring liberals will either maintain or increase their hold on the court until then.

The court likely will be deciding cases on abortion, public sector unions, voting rules and congressional district boundaries. Who controls the court also could factor into how it might rule on any future voting challenge in the perennial presidential battleground state, which raised the stakes of the race for national Republicans and Democrats.

Musk and groups he funded poured more than $21 million into the contest. Donald Trump Jr., the president's eldest son, campaigned for Schimel in the closing weeks and said electing him was essential to protecting the Republican agenda. Trump endorsed Schimel just 11 days before the election.

Schimel, who leaned into his Trump endorsement in the closing days of the race, said he would not be beholden to the president or Musk despite the massive spending on the race by groups that Musk supports.

Crawford benefitted from campaign stops by Minnesota Gov. Tim Walz, the vice presidential nominee last year, and money from billionaire megadonors including Soros and Illinois Gov. JB Pritzker.

The contest was the most expensive court race on record in the U.S., with spending nearing $99 million, according to a tally by the Brennan Center for Justice. That broke the previous record of $51 million record, for the state's Supreme Court race in 2023.

All of the spending and attention on the race led to high early voting turnout, with numbers more than 50% higher than the state’s Supreme Court race two years ago.

Crawford was elected to a 10-year term replacing liberal Justice Ann Walsh Bradley who is retiring after 30 years on the bench.

Supporters for Wisconsin Supreme Court candidate Susan Crawford cheer during her election night party Tuesday, April 1, 2025, in Madison, Wis. (AP Photo/Kayla Wolf)

Credit: AP

icon to expand image

Credit: AP

Supporters of Wisconsin Supreme Court candidate Susan Crawford celebrate during her election night party Tuesday, April 1, 2025, in Madison, Wis. (AP Photo/Kayla Wolf)

Credit: AP

icon to expand image

Credit: AP

Attendees watch a CNN broadcast as ballots are tallied during Wisconsin Supreme Court candidate Susan Crawford's election night party Tuesday, April 1, 2025, in Madison, Wis. (AP Photo/Kayla Wolf)

Credit: AP

icon to expand image

Credit: AP

Voters mark their ballots while voting at Centennial Hall at the Milwaukee Central Library on Election Day Tuesday, April 1, 2025, in Milwaukee. (AP Photo/Kayla Wolf)

Credit: AP

icon to expand image

Credit: AP

Voters mark their ballots while voting at Waters Edge event venue in the state's Supreme Court election, Tuesday, April 1, 2025, in Milwaukee. (AP Photo/Kayla Wolf)

Credit: AP

icon to expand image

Credit: AP

Wisconsin Supreme Court candidate Brad Schimel, center, warms up with his band "4 on the Floor" early at his election night party April 1, 2025, in Pewaukee, Wis. (AP Photo/Andy Manis)

Credit: AP

icon to expand image

Credit: AP

Supporters for Wisconsin Supreme Court candidate Susan Crawford take a photo in front of a sign during her election night party Tuesday, April 1, 2025, in Madison, Wis. (AP Photo/Kayla Wolf)

Credit: AP

icon to expand image

Credit: AP

Sandy Solo, of Milwaukee, watches a broadcast as ballots are tallied during Wisconsin Supreme Court candidate Susan Crawford's election night party Tuesday, April 1, 2025, in Madison, Wis. (AP Photo/Kayla Wolf)

Credit: AP

icon to expand image

Credit: AP

Stickers for Wisconsin Supreme Court candidate Susan Crawford are seen at her election night party Tuesday, April 1, 2025, in Madison, Wis. (AP Photo/Kayla Wolf)

Credit: AP

icon to expand image

Credit: AP

Josette Baublitz marks her ballot while voting at Waters Edge event venue in the state's Supreme Court election, Tuesday, April 1, 2025, in Milwaukee. (AP Photo/Kayla Wolf)

Credit: AP

icon to expand image

Credit: AP

Signs supporting Judge Susan Crawford, voting and election officials adorn the front yard of a home on South Sixteenth Street on Election Day Tuesday, April 1, 2025, in Milwaukee. (AP Photo/Kayla Wolf)

Credit: AP

icon to expand image

Credit: AP

Signs supporting Brad Schimel for Wisconsin Supreme Court and Brittany Kinser for Wisconsin Superintendent of Public Instruction adorn the lawn of a farm along County Road A on Election Day Tuesday, April 1, 2025, near Tibbets, Wis. (AP Photo/Kayla Wolf)

Credit: AP

icon to expand image

Credit: AP

A voter enters Centennial Hall at the Milwaukee Central Library to vote on Election Day Tuesday, April 1, 2025, in Milwaukee. (AP Photo/Kayla Wolf)

Credit: AP

icon to expand image

Credit: AP

Olivia Hansen carries her unmarked ballot to the voting booth while voting at Centennial Hall at the Milwaukee Central Library on Election Day Tuesday, April 1, 2025, in Milwaukee. (AP Photo/Kayla Wolf)

Credit: AP

icon to expand image

Credit: AP

Tainesha Johnson (CQ), center, marks her ballot while voting at Centennial Hall at the Milwaukee Central Library on Election Day Tuesday, April 1, 2025, in Milwaukee. (AP Photo/Kayla Wolf)

Credit: AP

icon to expand image

Credit: AP

Christopher Bravata, right, marks his ballot while voting at the Frank P. Zeidler Municipal Building on Election Day, Tuesday, April 1, 2025, in Milwaukee. (AP Photo/Kayla Wolf)

Credit: AP

icon to expand image

Credit: AP

Mike Rohleder marks his ballot while voting at Waters Edge event venue in the state's Supreme Court election, Tuesday, April 1, 2025, in Milwaukee. (AP Photo/Kayla Wolf)

Credit: AP

icon to expand image

Credit: AP

Maximillian Marquez marks his ballot while voting at the Milwaukee Academy of Chinese Language in the state's Supreme Court election, Tuesday, April 1, 2025, in Milwaukee. (AP Photo/Kayla Wolf)

Credit: AP

icon to expand image

Credit: AP

FILE - This combination of file photos shows Brad Schimel, former Republican attorney general Brad Schimel, in Madison, Wis., Jan. 5, 2015, and Susan Crawford in June 2024. (AP Photo/Andy Manis, Susan Crawford for Wisconsin, File)

Credit: AP

icon to expand image

Credit: AP

Wisconsin Supreme Court candidate Brad Schimel, center, speaks with supporters as former Gov. Scott Walker, left, watches on Monday, March 31, 2025, in Madison, Wis. (AP Photo/Scott Bauer)

Credit: AP

icon to expand image

Credit: AP

Wisconsin Supreme Court candidate Susan Crawford addresses a crowd Saturday, March 29, 2025 at a campaign stop at a field office for the Democratic Party of Wisconsin, in Milwaukee. (AP Photo/Andy Manis)

Credit: AP

icon to expand image

Credit: AP

Elon Musk speaks during a town hall Sunday, March 30, 2025, in Green Bay, Wis. (AP Photo/Jeffrey Phelps)

Credit: AP

icon to expand image

Credit: AP

Wisconsin Supreme Court candidate Brad Schimel addresses a rally Saturday, March 29, 2025 on a campaign stop at the American Serb Memorial Hall in Milwaukee. (AP Photo/Andy Manis)

Credit: AP

icon to expand image

Credit: AP

Wisconsin Supreme Court candidate Susan Crawford has her photo taken with supporters Saturday, March 29, 2025 at a campaign stop at a field office for the Democratic Party of Wisconsin, in Milwaukee. (AP Photo/Andy Manis)

Credit: AP

icon to expand image

Credit: AP