Nursultan Nazarbayev, the only leader that independent Kazakhstan has ever known, has abruptly announced his resignation after three decades in power, raising uncertainty over the country’s future course.

The 78-year-old said in a televised address to the oil-rich nation that he had taken the “difficult” decision to terminate his authority as president, effective on Wednesday.

He did not give a reason, but noted that he would have marked 30 years in the job later this year.

He said he sees his mission as ensuring the transfer of power to a new generation of politicians.

“It was an honour for me to serve the people,” he said. “I have worked hard to fulfil the nation’s will.”

Mr Nazarbayev added that he would retain the position of the chairman of the nation’s Security Council and the head of the ruling party. “I will serve you until the end of my days,” he said.

He said upper house speaker Kassym-Jomart Tokayev will serve as interim head of state in line with the constitution until a new election is held.

Kazakhstan, despite having a population of only 18 million, is the ninth largest country in the world with an area of more than a million square miles. It borders Russia to the north and China to the east and has extensive oil reserves that make it strategically and economically important.

Mr Nazarbayev came to power in 1989 as its Communist Party chief when it was part of the Soviet Union, and was first elected president weeks before the 1991 Soviet collapse.

In those days, Kazakhstan was a backwater region best known for prisons, nuclear testing sites and being the home of the launch facility of the Soviet space programme, the Baikonur Cosmodrome.

Mr Nazarbayev has been widely praised for maintaining stability and ethnic peace in Kazakhstan but has also faced criticism for marginalising the political opposition and creating what is effectively a one-party state.

He has maintained a delicate balance between Russia and the West, leading Kazakhstan to join a Russia-dominated economic alliance of ex-Soviet nations, but cultivating close energy ties and other links with the West.

He was lauded abroad for modernising the oil industry and his decision to give up the nuclear weapons Kazakhstan inherited from the Soviet Union.

In 1997, he moved the country’s capital from Almaty to the remote northern city of Astana in what was widely considered a way to fuse the ethnic-Russian minority in the north to the new Kazakh state.

The new city was filled with post-modern architecture including the soaring glass pyramid of the Palace of Peace and Accord, dedicated to harmony among religious and ethnic groups.

In 2010, Mr Nazarbayev was awarded the title of Leader of the Nation, which comes with lifelong immunity from prosecution and as-yet untested powers of veto over some government policies.

He departs at a time of rare open protest against the government.

He fired his prime minister and cabinet last month following a wave of protests by Kazakh women calling for more financial support for children and safer housing after a fire in which five children died.

Soon after, he announced a programme of more generous spending for large families.

He has extended his tenure by landslide victories in successive elections and plebiscites. He took nearly 98% of the vote in the most recent election, in 2015, when he was elected for another five-year term.

His resignation will set the stage for a potential battle between Russia and the US for influence with the successor government.

Nursultan Nazarbayev with Vladimir Putin in 2013 (Alexander Nemenov/AP)

Vladimir Putin’s spokesman Dmitry Peskov said the Russian president had spoken with Mr Nazarbayev by telephone earlier on Tuesday but did not say what they discussed.

Nazarbayev was born into a poor rural labourer’s family on July 6 1940. As a young adult, he worked in harsh conditions at a steel plant’s blast furnace and at 22 he joined the Communist Party.

He worked his way up in the party, went to university and became known for his comparatively candid assessments of the Soviet Union’s shortcomings.

That turn of mind positioned him in the reformist camp that came to ascendancy when Mikhail Gorbachev became leader of the Soviet Union in 1985.

Mr Nazarbayev was the last of Central Asia’s former Communist Party bosses to remain in power after the deaths of Turkmenistan’s Saparmurat Niyazov in 2006 and Uzbekistan’s Islam Karimov in 2016.

The president of Tajikistan, Emomali Rahmon, is now the region’s longest-serving head of state, having assumed power in 1992 during a civil war.