Boston's next mayor will be a 46-year-old former labor union leader and state representative from Dorchester.
State Rep. Marty Walsh defeated fellow mayoral candidate City Councilor John Connolly in a close race.
Walsh won the election with 72,514 votes - or about 52 percent of the vote - compared to Connolly's 67,606 votes - or about 48 percent of the vote with all of the precincts reporting.
Speaking from his election night party at the Park Plaza hotel, Walsh seemed amazed.
"This is unbelievable," said Walsh, before talking about the future. "Together we're going to make Boston a place where dreams come true for every child, for every person in every corner of this city."
During the campaign, Walsh touted himself as an experienced state legislator who created and protected jobs and who was familiar with the struggles of working-class families.
Walsh, a former alcoholic and childhood cancer survivor, won the support of multiple labor groups because of his union ties, but he also had to fight off criticism that he was too close to labor unions to be mayor and oversee city contract negotiations.
Walsh will succeed Mayor Thomas Menino, a popular mayor known for frequently appearing in most of Boston's neighborhoods.
During his concession speech, Connolly said that Walsh had his full support.
"Marty Walsh is a good man. He wants to do good things for Boston and he will do good things for Boston," Connolly said.
As for turnout, although Tuesday's election was the first open mayor's race in 30 years, fewer than half of the city's eligible registered voters participated.
About 141,800 votes were cast. That's about 38 percent of the city's 372,000 registered voters.
In 1983, the last time an open mayor's race was held in the city, more than 197,000 people voted, which was about 69 percent of Boston's registered voters at that time.
Follow Michael Naughton on Twitter @metrobosmike.