Opposition protests turned violent as riot police used tear gas and water cannon after disputed local elections.