It was not immediately clear exactly when Mr. Kilpatrick will cease to be mayor. His resignation letter says it is effective Sept. 18, but the city charter calls for immediate removal from office when an elected official is convicted of a felony.

News outlets in Detroit reported that Mr. Kilpatrick would speak to the city on television at 7 o’clock Thursday evening.

Mr. Kilpatrick’s lawyers tried unsuccessfully in recent days to negotiate plea agreements that would not involve jail time, but prosecutors were adamant. “You have to have some consequences to your actions  you don’t just lose your job and go on your way,” the Wayne County prosecutor, Kym L. Worthy, said on Thursday.

The plea agreements that were finally reached includes two sentences of 120 days in jail, one for the obstruction charges and one for the assault charge, but they are to be served at the same time.

Prosecutors agreed to sentences that were considerably lighter than Mr. Kilpatrick could have expected if convicted at trial. “I made a decision to get this done and move this region forward,” Ms. Worthy said.

Despite the legal closure for Mr. Kilpatrick, many people in Detroit see his departure as the beginning of a new chapter of challenges for the city. The council does not have a reputation for working well together, and the F.B.I. is investigating whether illegal payments were made in one of its recent multi-million dollar contract approvals.

How the city will be governed in the immediate future is an open question. “It will be a long time before anyone can say we recovered from this crisis and are fully back on track,” said John R. Chamberlin, a professor at the Gerald R. Ford School of Public Policy at the University of Michigan. “It will be measured in months and years, not weeks.”