SANTA ANA, Calif. (AP) — Incarcerated lawyer Michael Avenatti has pleaded guilty to four counts of wire fraud and a tax-related charge in a Southern California federal court case accusing him of cheating his clients out of millions of dollars.

Avenatti made the plea during a court hearing Thursday in Santa Ana. The 51-year-old lawyer said earlier this week that although he didn’t reach a deal with federal prosecutors he wanted to change his plea to be accountable and spare his family further embarrassment.

Avenatti is serving five years in prison in a federal facility in California for convictions in two cases in New York.