Iraqi police had detained the British undercover soldiers after a clash in the southern city .