Gun battles in a Balkan city with a history of ethnic tensions took the lives of five police officers, Macedonian authorities said.