PARIS — The alleged mastermind behind the Paris robbery of Kim Kardashian West has written the reality TV star an apology letter from his prison cell.

A person familiar with the case said Thursday that suspect Aomar Ait Khedache sent the letter to the investigating judge and that Kardashian West’s lawyers have had access to it.

TMZ website first reported on the letter.

It quoted Khedache as writing he regrets his actions and realizes the psychological damage he caused.

Kardashian West was held at gunpoint during the 2016 jewelry heist.