JANESVILLE, Wis. — Wisconsin Gov. Scott Walker (R) dropped out of the presidential race six months ago, but his presence still looms large here ahead of Tuesday’s primaries — in both the Democratic and Republican contests.

Walker’s endorsement of Ted Cruz appears to have bolstered the Texas senator’s prospects against real estate mogul Donald Trump in the Republican race.

Meanwhile, the two Democrats competing for their party’s nomination are using Walker as a punching bag, roundly criticizing his anti-union policies and spending priorities, much to the delight of their partisan audiences.

“When you want to think about the kind of administration Bernie Sanders would have, kind of think about Scott Walker in reverse,” Sanders said here Monday during an appearance at a union hall, where he took aim at the governor’s cuts to education spending and refusal to accept additional federal Medicaid dollars, among other things.

Clinton has repeatedly referred to Walker during her campaign appearances as well. Her speech at a Democratic dinner in Milwaukee on Saturday night included several broadsides against the two-term governor, whom she called a shortsighted “bully” who “attacks teachers, nurses and firefighters.”

Clinton drew hearty applause when she blasted a state judge named by Walker, Rebecca Bradley, who has likened contraception to murder and is on the ballot Tuesday as well.

Walker’s poll numbers in Wisconsin make clear why he’s such an inviting target for the Democrats.

Only 12 percent of registered Democratic voters in the state approve of the governor’s job performance, while 86 percent disapprove, according to a Marquette Law School poll released last week.

Among Republicans, however, Walker remains quite popular, having prevailed in three statewide elections since 2010, including a recall attempt. Eighty-three percent of registered Republicans approve of the job Walker is doing, while 14 percent disapprove, according to the same poll.

In the week since Walker endorsed him, Cruz has sung the governor’s praises, calling him “an outstanding leader in the conservative movement.”

What's more surprising is that Trump has repeatedly attacked Walker during his time campaigning in Wisconsin.

Trump has mocked Walker’s obsession with Harley-Davidson motorcycles and has played down the significance of Walker’s endorsement of Cruz.

"You have Walker, who can't support me because I hit him hard, but I hit him hard to win," Trump said during a campaign event in Superior, Wis., on Monday. "People are saying, 'He shouldn't be fighting the governor, the governor's popular.' First of all, he's not popular. Statewide he's very unpopular. I think I made him unpopular in the state."

Trump has also sought to discredit Walker’s record as governor, repeatedly telling voters that Wisconsin is “middle of the pack” compared with its neighboring states.

“The fact is you're doing very mediocre. Wisconsin is a much different place. You know, you're losing a lot of jobs. You're not going up, you're going sideways,” Trump said. “You're very average compared to your neighboring states, you're right in the middle, which is fine. I never called and asked for his support, to be honest, because I hit him too hard.”

On the Democratic side, Sanders’s criticism of Walker was particularly pointed on Monday.

“I understand you have a governor here who is trying to destroy the trade union movement,” Sanders told his crowd at a union hall. “Well, I’ve got some bad news for him. … Scott Walker wants to destroy trade unionism. I want to build trade unionism.”

Sanders also criticized Walker for believing that it’s a “great idea” to give tax breaks to large corporations while cutting education spending. Sanders said he has the exact opposite priorities.

And Sanders blasted Walker and other Republican governors who have refused to accept additional federal Medicaid dollars to provide health insurance to poor residents in their states.

“I’m not so impressed,” Sanders said. “Some of those people will die because they can’t get to a doctor when they should.”

Anne Geran, Abby Phillip and Scott Clement contributed to this report.