BUFFALO, N.Y. — A former upstate New York mayor will avoid jail time after stealing more than $54,000 in campaign contributions.

Former Dunkirk Mayor Richard Frey was sentenced in federal court in Buffalo Tuesday to six months in home confinement and ordered to pay restitution.

The 85-year-old Frey pleaded guilty earlier this year to wire fraud. He was Dunkirk mayor from January 2002 to January 2012.

Authorities say he solicited large contributions from businesses and business people while in office, and then used the money for himself. Prosecutors say he had substantial personal debt.