An ex-convict who spent seven years in federal prison for corruption reclaimed the Bridgeport mayor's office Tuesday, completing a stunning comeback bid that tapped nostalgia for brighter days in Connecticut's largest city.

Joe Ganim, who was released from prison only five years ago, declared victory in a race involving seven opponents.

"Tonight, we not only made history, but we defined a new course for this great city," Ganim said in a victory speech at Testo's restaurant, surrounded by supporters. "Of course, there's an element of redemption in all of this."

The Democrat's campaign was fueled by a wave of good will from many who fondly remembered his years in office, from 1991 until 2003, when he was convicted of 16 corruption charges. His supporters credit his leadership for a time of lower taxes, safer neighborhoods and cleaner parks.

Ganim, 56, entered the election as the endorsed candidate of the hard-luck city's most powerful party after defeating two-term incumbent Mayor Bill Finch in the primary. His victory created some awkwardness for the Democratic establishment, including Gov. Dannel P. Malloy, who declined to endorse a candidate in Tuesday's election.

Malloy, whose name prompted boos from the crowd when the state party chairman said Democratic leaders want to work with Ganim, issued a statement congratulating Ganim on his victory.

"I am hopeful that Mayor-elect Ganim will live up to the huge responsibility that comes with leading our state's biggest city by building trust not just with those within the city he will soon lead, but with leaders statewide. We must continue to make progress in Bridgeport," Malloy said.

Some of Ganim's strongest competition came from Mary Jane Foster, an administrator at the University of Bridgeport who petitioned her way onto the ballot after losing in the Democratic primary. Foster, who had been endorsed by Finch and the city's largest newspaper, said the city of 150,000 people is still battling a reputation for corruption earned by Ganim's criminal conviction.

Ganim was sent to prison for steering city contracts in exchange for hundreds of thousands of dollars in expensive wine, custom clothes, cash and home improvements. Since his release, he has worked as a legal assistant at his family's Bridgeport law firm, but he has been blocked by the courts from regaining his law license.

Ganim issued a public apology for his crimes earlier this year. On the campaign trail, where he has tapped nostalgia for what some remember as a times of lower taxes and safer neighborhoods, Ganim said the support he has received shows people are open to supporting somebody who owns up to their errors.

Eddie Moro, 58, a security employee in the public school system, said at the victory party that he has no problem with Ganim's criminal record. And he wasn't surprised that many of his fellow voters didn't have a problem with it either.

"He didn't kill nobody," he said. "He didn't rape nobody."

"He's been through a lot in his life," he said. "He's going to be a better mayor, now, more than ever."