After weeks of mounting pressure, Mayor Catherine Pugh of Baltimore resigned on Thursday amid a widening scandal involving hundreds of thousands of dollars worth of children’s books that she wrote and that the University of Maryland Medical System paid for while she was serving on its board of directors.

Her resignation comes days after the Baltimore City Council proposed amending the city charter to make it possible to remove her, and after the F.B.I. raided her two homes and her office at City Hall.

Ms. Pugh stepped down from the hospital network’s board, which she had served on since 2001, but she had resisted calls to step down as mayor. She has been home on medical leave for weeks. Her lawyer told reporters previously that she was too ill to make decisions. Bernard Young, president of the Baltimore City Council, has been serving as acting mayor and will complete the rest of her term.

“I am sorry for the harm that I have caused to the image of Baltimore and the credibility of the office of the mayor,” Ms. Pugh said in a statement read aloud by her lawyer, Steve Silverman, at a brief news conference that she did not attend. “Baltimore deserves a mayor who can move our great city forward.”