NEW YORK — Michael Cohen, President Donald Trump's ex-personal lawyer, has asked a federal judge to spare him prison time for his guilty pleas in crimes that implicated his former boss in questionable actions or potential illegality.

Expressing repentance, contrition and shame in a sentencing memorandum filed late Friday, the 52-year-old former fixer for the president cited his continuing cooperation with Special Counsel Robert Mueller, whose investigation Trump has been angrily branded a "witch hunt" in numerous statements and tweets.

Attorneys for Cohen said he had also met twice with federal prosecutors in New York and answered questions regarding "an ongoing investigation" that was not described further in the memo.

The lawyers also described Cohen's cooperation with New York State officials who are investigating potential nonprofit and tax problems involving the Donald J. Trump Foundation, Trump's private charity, and the president himself.

"In the context of this raw, full-bore attack by the most powerful person in the United States, Michael, formerly a confidante and adviser to Mr. Trump, resolved to cooperate, and voluntarily took the first steps toward doing so even before he was charged," Cohen attorneys Guy Petrillo and Amy Lester wrote in the sentencing memorandum.

They filed the memo with Manhattan U.S. District Court Judge William Pauley, who is scheduled to sentence Cohen on Dec. 12.