Former Detroit mayor Kwame Kilpatrick (D) was sentenced to 28 years in prison on Thursday for corruption crimes, a victory for prosecutors who sought a sentence of that length.

Kilpatrick "appeared stunned at the sentence" handed down by U.S. District Judge Nancy Edmunds, the Detroit News reported.

In March, Kilpatrick was convicted on charges of racketeering conspiracy, fraud, extortion and tax crimes. Prosecutors sought a 28-year sentence. Kilpatrick's attorneys wanted no more than 15.

Kilpatrick served as Detroit's mayor from 2002 until he resigned in 2008 and entered into a felony plea agreement related to an extramarital affair with his chief of staff.