When Ahmadinejad won the June election with a wide margin , his reformist opponents cried foul and thousands of Iranians took to the streets in the biggest anti-government demonstrations in the 30-year history of the Islamic Republic .