In a letter to the PM, Ali says remaining in the role will be a ‘distraction’ from the work of the government