MADISON - Bernie Sanders endorsed Jill Karofsky for state Supreme Court Thursday as Wisconsin prepares for a mostly absentee election next week.

"Judges should know that women have the right to control their own bodies, that workers have the right to bargain for better wages, that same-sex marriage is a right, and that addressing the gun violence epidemic in this country is one of the most critical issues of this generation," Sanders said in a statement. "Judges should stand up for the needs of working people and civil rights, not huge corporate CEO donors, which is why I strongly endorse Judge Jill Karofsky for the Wisconsin Supreme Court."

Karofsky, a Dane County Circuit Court judge, faces Justice Daniel Kelly in Tuesday's election.

Kelly was endorsed by President Donald Trump in January during a rally in Milwaukee. Trump's campaign used the Sanders endorsement to criticize Karofsky.

"Jill Karofsky is showing her true political allegiance by linking arms with socialist Bernie Sanders. Their partisan socialist alliance has no place on Wisconsin’s highest court," Trump campaign spokeswoman Anna Kelly said in a statement.

Sanders, a U.S. senator from Vermont, faces former Vice President Joe Biden in Tuesday's Democratic presidential primary.

Sanders has called for the primary to be delayed because of the coronavirus outbreak, but a federal judge this week signaled he was unlikely to do that. Because of the dangers of going to the polls, voters have turned to absentee voting in record numbers.

The Supreme Court race is officially nonpartisan, but like those before it has turned into a partisan brawl. Karofsky has criticized Kelly for getting Trump's endorsement and headquartering his campaign in the state Republican Party's office, even as she has leaned heavily on the Democratic Party for $1.3 million of support.

Contact Patrick Marley at patrick.marley@jrn.com. Follow him on Twitter at @patrickdmarley.