The London Bridge attacker wrote a letter from jail in 2012 asking to take part in the deradicalization course to become “a good British citizen.”

Usman Khan, 28 — who killed two people and hurt three others in Friday’s attack — said he came to see violent extremism as wrong while he was in prison.

Khan, a native of Pakistan who had ties to a jihadi leader who sought help from ISIS, was released from prison a year ago after serving just half of a 16-year sentence for plotting with eight others in 2010 to bomb such London landmarks as the stock exchange, the American embassy and Westminster Abbey.

While he was in jail, he wrote a letter claiming he was “immature” when he joined the plot and wanted to “learn Islam and its teachings” through a “deradicalization course.”

“I would like to do such a course so I can prove to the authorities, my family and soicity (sic) in general that I don’t carry the views I had before my arrest and also I can prove that at the time I was immature,” he wrote, according to ITV News. “And now I am much more mature and want to live my life as a good Muslim and also a good citizen of Britain.”

Khan’s lawyer, Vajahat Sharif, said that once or twice before he was released, Khan “requested intervention by a deradicalizer when he was in prison. The only option was the probation service and they cannot deal with these offenders. He asked me on the phone to get assistance from a specific deradicalizer,” he told The Guardian.

“Probation [officers] do a good job with conventional offenders but they can’t deal with ideological offenders,” the attorney said.

Neil Basu, London’s police counter-terrorism chief, said Khan was attending a program that works to educate prisoners when he launched Friday’s attack just yards from the site of a deadly 2017 van and knife rampage, the Associated Press reported.