Updated

Kwame Kilpatrick stepped down as the mayor of Detroit Thursday after pleading guilty to two counts of obstruction of justice stemming from a sex-and-misconduct scandal that has plagued the Motor City for months.

Kilpatrick also pleaded no contest to assaulting or obstructing a public officer as part of the plea agreement, which ends his role as mayor of the nation's 11th-largest city.

Click here to read the plea agreement (PDF).

He'll serve two concurrent 4-month jail sentences at the Wayne County Jail and pay the city $1 million over a five-year probationary period. Kilpatrick cannot run for elected office during his probation, loses his law license and forfeits his pension.

"We cannot tolerate, in any form, corruption in this town," Wayne County Prosecutor Kym Worthy said outside court, adding that "responsibility taken without consequence is no responsibility at all."

Click here for photos.

Kilpatrick's one-sentence resignation was entered along with his plea Thursday. It stated the 38-year-old, once dubbed the "Hip-Hop Mayor," would remain acting as mayor through Sept. 18, which prosecutors said was needed to help City Council President Ken Cockrel Jr. take the reins.

Click here to read his resignation letter (PDF).

Click here to read about the interim mayor.

When asked by Wayne County Circuit Court Judge David Groener whether he understood that his plea would mean relinquishing the right to be presumed innocent until proven guilty, Kilpatrick responded: "I think I gave that up a long time ago, Your Honor."

The plea deal ends months of wrangling for control of the city in the Kilpatrick case.

Click here to read about his legacy as mayor.

The embattled mayor, who previously refused to resign, faced 10 felonies in two cases, one an apparent cover-up of a racy text-message relationship with his then chief-of-staff Christine Beatty. She still faces charges in the case and will appear again in court on Sept. 11.

The mayor's wife, Carlita, also attended the hearing Thursday.

Kilpatrick's guilty pleas Thursday were related to two instances where prosecutors alleged he committed perjury — on Oct. 11, 2004, and Aug. 29, 2007.

"I lied under oath in the case of Gary Brown and Harold Nelthrope versus the city of Detroit," Kilpatrick read in court, referring to the October incident. "I did so with an intent to mislead the court and the jury to impede and obstruct the fair administration of justice."

He went on to say that he lied under oath twice more.

Kilpatrick pleaded no contest to a July 24, 2008, incident at his sister's home, acknowledging shoving two police officers who were trying to serve a subpoena at the residence.

Set to be sentenced on Oct. 28, Kilpatrick will be sent straight to jail following the court appearance, Worthy said.

The mayor's resignation was what prosecutors had wanted all along, Worthy said outside the courtroom.

"The resignation was never, ever a bargaining chip for me," the prosecutor said. "He could have resigned right away; my position would have been much more favorable if that had happened. It did not help that the region was dragged through this."

News of the plea deal came as the city's police Chief Ella M. Bully-Cummings, a Kilpatrick appointee, also tendered her resignation. Meanwhile, Michigan Gov. Jennifer Granholm suspended a hearing she led Wednesday to have the mayor removed from office.

"Today this sad but historic story is coming to an end. It's very important for us as a state and as a city to turn this page together," Granholm said. "There is much work to do. It is my profound hope that we can now write a new history for this great but embattled city and that the citizens of Detroit can begin the healing process to move forward."

Cockrel, the city council's president and three-term councilman dubbed "Shrek" by a colleague in April during a heated debate — is set to serve as interim mayor until a special election can be held.

"It's a sad day for Detroit," said Tom Cameron of the Michigan Attorney General's office. "We're looking forward to moving on."