Police ordered to pay compensation for wrongful detention