For bonus points — was it sudden jihad syndrome?
He claims he was angry about the courts not letting him see his son, so he picked the cop at random and killed him.