Embattled Baltimore Mayor Catherine Pugh, who has been away from the job amid a corruption scandal centered around a children’s book, announced her resignation through her lawyer Thursday.

"Dear citizens of Baltimore, I would like to thank you for allowing me to serve as the fiftieth mayor. It has been an honor and a privilege," the statement read by her lawyer said. "Today I am submitting my written resignation to the Baltimore City Council."

"I am sorry for the harm that I have caused to the image of the city of Baltimore and the credibility of the office of the mayor," Pugh's statement continued. "Baltimore deserves a mayor who can move our great city forward."

The announcement was widely expected as Maryland Gov. Larry Hogan, a Republican, and members of the Baltimore City Council and others had called for the mayor to resign.

Download the NBC News app for breaking news and politics

Last week, federal agents searched the homes and City Hall offices of Pugh, who is under state investigation over hundreds of thousands of dollars earned selling her "Healthy Holly" series of children’s books to a health plan that does business with the city and a University of Maryland medical system she once helped oversee.

Pugh's announcement was delayed by health issues. On April 1, she took a leave of absence to recover from pneumonia. Last week, her attorney, Steve Silverman, said any decision on whether to resign or not would only come when she is “physically and mentally sound and lucid enough to make appropriate decisions.”

Silverman said Pugh had been suffering from severe pneumonia and severe bronchitis and was “under a tremendous amount of stress.”

“She is physically still ill and she is obviously emotionally extremely distraught, and I feel terrible for her as a human being,” he said last week, adding that Pugh was entitled to the presumption of innocence and she had apologized to the people of Baltimore.

Pugh has yet to be charged with anything, and the scope of the investigation into her book sales is unclear, but federal investigators have joined state and city efforts to make sense of how she earned hundreds of thousands of dollars from her self-published book sold to the hospital network.

Federal agents remove items from the home of Baltimore Mayor Catherine Pugh in the 3400 block of Ellamont Rd as they execute a search warrant, on April 25 in Baltimore, Maryland. John Strohsacker / Getty Images

Pugh assumed office in 2016, winning 57 percent of the popular vote. Before that, she served in the Maryland Senate.

The city is currently being run by acting Mayor Bernard "Jack" Young, who has quickly been working to override Pugh's legacy, firing staffers and replacing her name on city documents.

“People should understand we’re still moving the city forward with a steady hand,” Young said at a press conference last week.