Josh Kraft had harshly criticized the policies of Mayor Michelle Wu, a fellow Democrat, but his message did not resonate with voters.

Boston Mayor Michelle Wu and challenger Josh Kraft will both advance to the November general election in the race to be the city’s mayor.

Josh Kraft spent millions of his own money on the race.