Mahdi, who killed an officer in 2004, endured torture in his childhood and argued he was denied a fair trial