Arizona killer Jodi Arias’ lawyer has agreed to a suspension from the practice of law for four years for writing a tell-all book about his infamous client, local media report.

The State Bar of Arizona accused Kirk Nurmi of ethical lapses for disclosing in “Trapped with Ms. Arias” confidential conversations he had with his client and her family as her court-appointed counsel, the Arizona Republic of Phoenix reported Thursday.

Nurmi reached a deal with the state bar this month to avoid a disciplinary hearing that could have led to his disbarment, according to the paper. The deal has to be approved by a judge.

The state bar’s lawyers said Nurmi portrayed his client in a negative light in the book, KNXV-TV reported.

Arias, now 36, is serving a life sentence after she was convicted of killing ex-boyfriend Travis Alexander, 30, in suburban Phoenix in 2008.

The killing drew international notoriety after Arias gave two television interviews in which she told a bizarre story of masked intruders breaking into the home and killing Alexander while she cowered in fear. She subsequently changed her story and said she acted in self-defense after he attacked her. Her attorneys portrayed Alexander as a sexual deviant who physically and emotionally abused Arias.

The 2013 trial became a media circus as details of their tawdry relationship and the violent crime scene emerged, broadcast live. Spectators traveled to Phoenix and lined up in the middle of the night to get a seat in the courtroom to catch a glimpse of what had become to many a real-life soap opera.

Nurmi self-published the book a year ago, the Republic reported.

The Associated Press contributed to this report.