The mayor of the US city of Detroit is to step down after pleading guilty to two charges of obstructing justice, reported BBC.
Kwame Kilpatrick had been charged with misconduct, obstruction of justice and lying under oath to try to cover up an affair with his former chief-of-staff.
He was also accused of sacking a police officer who was investigating reports of a wild party at his mayoral mansion.
Mr Kilpatrick's plea deal means he will spend 120 days in jail and will pay $1m (£500,000) in restitution to the city.
He has also agreed that he will not run for office for five years.
In Wayne County court, Mr Kilpatrick read out a statement in which he admitted to two counts of lying under oath during a police whistle-blower trial in 2007.
"I did so with the intent to mislead the court and jury and to impede and obstruct the administration of justice," he said.
Judge David Groner asked Mr Kilpatrick whether he understood he was giving up the right to be considered innocent until proven guilty.
"I gave that up a long time ago," the mayor replied.
He had faced up to 15 years in prison if convicted.
Mr Kilpatrick and his former aide Christine Beatty were charged with lying under oath after sexually explicit text messages surfaced that appeared to contradict their sworn denials of the alleged affair.
Ms Beatty has pleaded not guilty to the perjury charges and will appear in court again on 11 September.
A prominent African-American politician who was elected mayor at the age of 31, Mr Kilpatrick had been considered one of the rising stars of the Democratic Party.
Mr Kilpatrick's resignation will come into effect in two weeks and he will return to court on 28 October for sentencing.
He already spent one night in jail in August, for violating the terms of his bail by travelling to Canada without informing the court.
City council president Ken Cockrel will serve as interim mayor until special elections can be held.