MADISON, Wis. -

Major Wisconsin unions that had endorsed Kathleen Falk in the Democratic primary for governor are now backing the winner, Milwaukee Mayor Tom Barrett.

Barrett defeated Falk and two other Democrats in Tuesday's primary. He will face Republican Gov. Scott Walker in June.

Unions have had a rocky relationship with Barrett during his eight years as Milwaukee mayor, and some leaders urged him not to get into the race.

But following his win, praise came from the statewide teachers union, the largest union representing state workers and the AFL-CIO.

Leaders of the American Federation of State, County and Municipal Employees said they will do everything they can to defeat Walker.

The recall was spurred by Walker's proposal effectively ending collective bargaining rights for most public workers.

Barrett also is getting support from another big supporter: President Barack Obama.

A spokesman said the president is proud to stand with Milwaukee Mayor Tom Barrett as he prepares to face Republican Gov. Scott Walker in a recall election.

Obama for America Wisconsin state director Tripp Wellde issued a statement Tuesday after Barrett won the Democratic primary.

Wellde says, "President Obama is proud to stand with Tom Barrett and the hundreds of thousands of Wisconsin families who are coming together to move Wisconsin forward."

The recall election is June 5.