MOSCOW — Police detained hundreds of people in Kazakhstan amid unauthorized protests of a presidential election Sunday that opponents alleged was a fake exercise in democracy.

Officers, some in riot gear with shields and helmets, broke up the demonstrations in the capital, Nur-Sultan, and in Almaty, the Central Asian country’s main commercial city. Some 500 protesters were taken to police stations, a government official said.

Three police officers were injured in the clashes, Deputy Interior Minister Marat Kozhayev said. There were no immediate reports of charges following the arrests.

The snap election was called after the unexpected March resignation of President Nursultan Nazarbayev, 78, who had led the country since its independence from the Soviet Union in 1991. Many people assumed Nazarbayev would run for re-election during a regularly scheduled presidential vote next year.

The protesters alleged the election to choose his successor would not be free or fair, and had called for a voter boycott.

Nazarbayev loyalist Kassym-Jomart Tokayev, the upper house speaker who became acting president when Nazarbayev stepped down, was expected to win easily.

Seven candidates were on the ballot, including a genuine opposition figure for the first time since independence.

The opposition candidate, Amirzhan Kossanov, said he had no complaints about possible campaign violations before Sunday’s contest.

“But the most important result, the peak of the election political process, is counting of the votes,” Kossanov said.

The national elections commission reported that about 77% of the electorate turned out to vote. Previous presidential elections had reported turnouts of more than 90%.

Kazakhstan recently has experienced rising opposition sentiment. Previous anti-government rallies took place in the spring to protest the early election, which opponents saw as an orchestrated handover of power.

One of the most prosperous former Soviet republics, large Kazakhstan stands at a crossroads between neighbors China and Russia.