KUALA LUMPUR, Malaysia—Police fired tear gas and chemical-laced water at thousands of protesters demonstrating for cleaner elections, potentially undermining Prime Minister Najib Razak's efforts to present himself as a political reformer with elections months away.

Riot police took action on Saturday when some of the tens of thousands of demonstrators began encroaching on the historic Merdeka Square in the center of downtown Kuala Lumpur, despite police and government warnings to keep away from the area. Some groups of demonstrators...