Police in Kazakhstan detained about 500 people on Sunday after dispersing rallies protesting as undemocratic a presidential election that will confirm Kassym-Jomart Tokayev as the successor to veteran leader Nursultan Nazarbayev.

Nazarbayev, who had run the oil-rich former Soviet republic for almost three decades before stepping down in March and retains sweeping powers, handpicked the 66-year-old diplomat to succeed him, making the outcome of the vote all but certain.

Hundreds of people chanting “Shame!” staged protests against the poll on Sunday in Almaty and Nur-Sultan, the Kazakh capital that was renamed after Nazarbayev at Tokayev’s suggestion.

But the smooth transfer of the presidency is positive news for neighboring Russia and China, and for foreign energy and mining companies who have invested hundreds of billions of dollars in the Central Asian state.

For many of its 12 million registered voters, interim president Tokayev, a former prime minister and foreign minister, was the only familiar face among seven candidates in a brief and uneventful campaign.

“Well, Nazarbayev is no longer on the ballot, and I do not know any of the other candidates,” said Natalya, a pensioner, after casting her vote on Sunday for the incumbent.

Nazarbayev, 78, who holds the official title of Yelbasy, or national leader, and continues to run the ruling Nur Otan party, has routinely garnered more than 90 percent of the vote in elections described by Western observers as neither free nor fair.

Kazakhstan’s rubber-stamp parliament, whose upper chamber Tokayev chaired before assuming the presidency, is devoid of opposition, and dissent is largely stifled through control of traditional and electronic media and social networks.

Tokayev said after voting in Nur-Sultan that he planned to include young activists critical of the government in a “special committee” to promote dialogue.

Tokayev himself said he had no doubt that he would win the election and promised to take guidance from Nazarbayev on strategic matters. Insiders say the men effectively share the presidential palace, although Nazarbayev’s new office is in a different building.

On the foreign policy side, Tokayev, who studied at an elite Soviet diplomatic school in Moscow and focused on China, is likely to continue Nazarbayev’s policy of balancing between Russia, China and the West. That approach has helped Kazakhstan attract foreign investment and open up markets for its oil and metals exports.

Kazakhstan’s Central Election Commission reported a turnout of 77 percent and said it would announce preliminary results Monday. Late Sunday, exit polls put Kassym-Jomart’s share of the vote at 70 percent.