A judge on Tuesday sentenced former Mayor Eddie Perez to three years in prison for taking a bribe and attempted extortion, saying he must be held accountable for his actions despite his good deeds.

Hartford Superior Court Judge Julia Dewey said Perez, 52, also must serve three years of probation after the prison time, though he was allowed to remain free on $100,000 bond while he appeals the convictions.

Perez, who escaped an impoverished childhood to become a community activist and Hartford's first Latino mayor, said he will never forgive himself for disappointing his supporters.

Dozens of them accompanied Perez to court Tuesday, including 14 who spoke as character witnesses and pleaded with the judge to spare him prison time.

"The city has suffered, my family has suffered, I have suffered," Perez told the judge as his wife and his mother sobbed on the courtroom benches behind him. "Each and every day, your honor, each and every day for the rest of my life I will make amends and pursue forgiveness."

Prosecutors said Perez accepted $40,000 in kitchen repairs, bathroom renovations and other home improvements as a bribe from a contractor who wanted to keep a $2.4 million city contract. Then, they say, he lied to investigators and paid half the cost in hopes of deflecting suspicion about the work.

They said Perez also tried to extort $100,000 from a developer for a political ally.

Perez, a Democrat, had faced up to 60 years in prison if given the maximum sentence, but prosecutors asked for five years. He was convicted in June of five charges and resigned a week later.

The judge said she considered Perez's decades of public service, his commitment to education and social issues and the many unsung acts of kindness that supporters shared with her through more than 200 letters.

But she said she also could not overlook what she called "a major disservice and major damage" to the faith of Hartford citizens who believed in him.

"Normally your type of individual is not before the court, but you violated the public trust," the judge said. "Your conduct was just unacceptable. It violates the core of our constitutional system of government, a constitution you swore to uphold several times."

Assistant State's Attorney Michael Gailor said Perez showed no remorse for his actions, which he said appeared to be driven by a sense of entitlement and disregard for the example of other corrupt politicians before him who'd served prison time.

Perez was convicted of receiving a bribe, conspiracy to fabricate evidence, accessory to the fabrication of evidence, conspiracy to commit first-degree larceny by extortion and criminal attempt to commit first-degree larceny by extortion. He was acquitted of a charge of fabricating evidence.

Perez left court later Tuesday with his family without comment after posting bond. A timetable was not set on when his appeal would be filed and handled by the appellate court.

Corruption investigations have brought down several Connecticut politicians over the past few decades, though almost always in federal court rather than in state court like Perez.

Gov. John G. Rowland resigned in 2004 and served 10 months in federal prison after admitting he traded political access for vacations and repairs to his lakeside cottage.

Former Bridgeport Mayor Joseph Ganim served nearly seven years in prison on a corruption conviction and was released this summer from a halfway house. Former Waterbury Mayor Philip Giordano is serving a 37-year federal sentence for sexually abusing two young girls.

Perez was arrested in January 2009 on the bribe-receiving charge. Authorities said Perez paid only $20,000 for the $40,000 worth of renovations done in 2005 and 2006, but only after he was questioned by a grand jury investigating corruption in the city.

The contractor, Carlos Costa, also was charged. He told authorities he didn't expect to get paid for the home improvements because that was the "cost of me doing business with the city," according to an arrest warrant affidavit.

Perez was arrested again in September 2009, when state authorities charged him and former Hartford state Rep. Abraham Giles with attempted extortion and conspiracy, accusing them of trying to extort $250,000 from a developer who wanted to buy city-owned property.