The high court in Johannesburg has ordered Operation Dudula to stop harassing foreign nationals and directed the police and key government departments to enforce the ruling.