BOSTON State Rep. Martin J. Walsh, a longtime labor leader who grew up in a triple-decker in Dorchester, edged City Councilor At-Large John Connolly Tuesday to become Boston’s 48th mayor.
Walsh, little known outside his Dorchester legislative district when the race began, built a broad coalition that stretched down the eastern half of the city — from South Boston through the heart of black Boston and into a diverse Hyde Park.
His campaign was built on his against-the-odds biography: a son of Irish immigrants who overcame a childhood fight against cancer and a young adult’s struggle with alcoholism.
“For this kid from Taft Street in Dorchester, you’ve made Boston a place where dreams come true,” he said, before a raucous crowd at the Park Plaza Hotel. “Together we’re going to make Boston a place where dreams come true for every child and every person in every corner of this city.”
Connolly thanked supporters and pledged to support Walsh in a gracious concession speech just blocks away at the Westin Copley Place.
“Marty Walsh is a good man, he wants to do good things for Boston and he will do good things for Boston,” he said.
Walsh, who beat Connolly 52 to 48 percent, will replace departing Mayor Thomas Menino, an enormously popular figure who oversaw a period of sharp growth in the city.
Walsh, 46, has called for universal preschool and improved high schools. He’s pledged to usher in a more diverse City Hall. And he’s proposed a dismantling of the Boston Redevelopment Authority — a powerful, opaque agency that has shaped the city’s skyline and neighborhoods for decades.
But the campaign turned less on policy — where there were few major differences between the candidates — than on identity politics.
Connolly, 40, appealed to younger, newer arrivals to the city, with a heavy focus on education and an oft-repeated promise to make City Hall run more like an Apple store.
The message delivered majorities in the more upscale precincts on the western edge of the city, starting with his West Roxbury base and extending up through Jamaica Plain and into the Back Bay and South End.
Walsh cast himself as a working-class champion, a message he rode to victories in minority Boston and the white, blue-collar wards of South Boston and Dorchester.
“I’ve known Marty my whole life,” said Colin McDermott, 29, a Dorchester salesman who voted for Walsh. “He’s a good local guy. He’s always stayed true to his roots.”
Walsh’s victory puts an Irish-American back in the mayor’s office — restarting a long tradition broken by Menino, the city’s first Italian-American mayor.
Menino appeared wistful on Tuesday morning, after casting his ballot in Hyde Park. “I’m going to miss it, miss it a lot,” he told reporters. “But it’s time to go pasture.”
Menino announced in March that he would not seek re-election, unleashing a generation of pent-up political ambition.
Twelve candidates got into the race amid deep uncertainty about how the politics of an evolving city — younger and more diverse — might play out.
Several credible minority candidates emerged. But in the end it was two Irish-Americans who made it to the final election.
Walsh faced, perhaps, the bigger challenge at that point. Connolly had served as an at-large councilor for six years and built relationships across the city. Walsh had to move quickly to expand beyond his home base.
He got a jolt when he picked up the endorsements of the top three minority vote-getters in the preliminary election: former state Rep. Charlotte Golar Richie, City Councilor At-Large Felix Arroyo and former nonprofit executive John Barros.
Polling suggested the endorsements mattered, with voters who backed one of the three minority candidates in the preliminary favoring Walsh by wide margins.
In the end, Walsh won sizable victories in the mostly black neighborhoods of Roxbury and Mattapan — besting Connolly 60 to 40 percent in some precincts. And while he lost white, liberal neighborhoods, the endorsements helped keep him competitive enough.
David McNamara, 58, a social worker in Jamaica Plain, voted for Barros in the preliminary. And he said Barros’s support for Walsh helped convince him to vote for the Dorchester representative.
“I liked [Barros] because of what he had done and his progressive politics,” said McNamara. “If he … felt strongly about Marty Walsh, then that was helpful.”
Meredith Bazirgan, 33, another Jamaica Plain social worker, cast a ballot for Connolly, citing his emphasis on education. “[I’m] thinking about the future,” she said, an infant son squirming in her arms.
Connolly, who taught in urban schools in New York and Boston for three years after graduating from Harvard University, made improving the schools the centerpiece of his council career and mayoral campaign.
He sought to link better schools to other issues — safer neighborhoods and a better economy. But polls suggest voters concerned about issues other than education — jobs and crime — were more supportive of Walsh.
The race grew chippy in the closing stages. Connolly hit Walsh hard on his union ties, arguing he couldn’t be trusted to negotiate with city unions. Walsh suggested Connolly, with his focus on education, was a one-note candidate.
The race saw outside groups spend unprecedented sums.
Organized labor and other groups backing Walsh spent at least $2.5 million and Democrats for Education Reform, a national advocacy group based in New York, dropped at least $1.3 million on a pro-Connolly campaign.
The money paid for canvassers, television ads and mailers that were sometimes sharp in tone. A series of labor-sponsored fliers dubbed Connolly, the scion of a prominent political family, a “son of privilege.”
Walsh renounced the attack. Connolly called it a “savage” assault on his family. But it worked its way into the narrative of the campaign.
The mayoral race faced stiff competition for local attention, from the trial of South Boston mobster James “Whitey” Bulger in the summer to the Red Sox’s World Series run in the fall.
But voter turnout was relatively strong for a municipal election Tuesday, with 40 percent of voters casting ballots — suggesting that the candidates, if similar in appearance and platform, were able to generate some enthusiasm.
Walsh, who fielded congratulatory calls from Connolly, Menino and President Obama before bounding onto the stage Tuesday night, provided some insight into his appeal with an ebullient, down-to-earth victory speech.
“This is unbelievable,” he said, with an everyman’s wonder, at the start.
Asma Khalid contributed to this report.