ALMATY (Reuters) - Kazakhstan’s President Nursultan Nazarbayev unexpectedly resigned on Tuesday after three decades in power, in what appeared to be the first step in a choreographed political transition that will see him retain considerable sway.

Known as “Papa” to many Kazakhs, the 78-year-old former steel worker and Communist party apparatchik has ruled the vast oil and gas-rich Central Asian nation since 1989, when it was still part of the Soviet Union.

Bestowed by parliament with the official title of “The Leader of the Nation”, he was the last Soviet-era leader still in office and oversaw extensive market reforms while remaining widely popular in his country of 18 million people.

“I have taken a decision, which was not easy for me, to resign as president,” Nazarbayev said in a nationwide TV address, flanked by his country’s blue and yellow flags, before signing a decree terminating his powers from March 20.

“As the founder of the independent Kazakh state I see my task now in facilitating the rise of a new generation of leaders who will continue the reforms that are underway in the country.”

But Nazarbayev, a close ally of Russian President Vladimir Putin, said he would retain key security council and party leader positions and hand over the presidency to a loyal ally for the rest of his term, which ends in April 2020.

Kassym-Jomart Tokayev, speaker of the upper house of parliament, will take over as Kazakhstan’s acting president for the remainder of his term in line with the constitution, Nazarbayev said.

Nazarbayev has no apparent long-term successor. His decision hit the price of Kazakh bonds, while the London-listed shares of Kazakhstan’s biggest bank, Halyk Bank, tumbled 5 percent. The news also appeared to weigh on the Russian rouble. Moscow is Kazakhstan’s main trade partner.

The Kremlin said Nazarbayev and Putin had spoken by phone on Tuesday, but gave no details of their conversation.

SMOOTHER TRANSITION?

“(Nazarbayev) will continue to some extent to oversee things, so it is not like he has cut the cord totally - he still has his fingers in the pie,” said Theodor Kirschner of Capitulum Asset Management in Berlin.

“That a 78-year-old won’t be sticking around forever shouldn’t be such a surprise to anyone, and this move makes the transition smoother. This doesn’t really give us a headache.”

Nazarbayev, who helped attract tens of billions of dollars from foreign energy companies and more than tripled Kazakh oil output, said he would continue to chair the Security Council and remain leader of the Nur Otan party which dominates parliament.

Slideshow ( 5 images )

The new acting president, 65-year-old Tokayev, is a Moscow-educated career diplomat fluent in Kazakh, Russian, English and Chinese who has previously served as Kazakhstan’s foreign minister and prime minister.

While praising Tokayev as “a man who can be trusted to lead Kazakhstan”, Nazarbayev - who has three daughters - stopped short of endorsing him as his preferred heir.

“We expect Tokayev to be an interim figure,” said Camilla Hagelund, an analyst at consulting firm Verisk Maplecroft. “The real question is, who will be Kazakhstan’s third president.”

Slideshow ( 5 images )

Kazakhstan is scheduled to hold both presidential and parliamentary elections next year.

Nazarbayev’s eldest daughter, Dariga, the most politically ambitious of his children, is a senator and once led a political party of her own. Another close relative, his nephew Samat Abish, is the No.2 official on the National Security Committee.

The head of state security, 53-year-old Karim Masimov, is also a close Nazarbayev confidant. He has served twice as prime minister and also worked as the president’s chief of staff.

But regardless of who eventually leads Kazakhstan, the transition may slow reforms, including in the key energy sector, according to GlobalData analyst Will Scargill.

“Although Nazarbayev will retain some key roles, his decision to resign will doubtless slow policy-making as political dynamics are restructured,” Scargill said.

Uncertainty could also hurt investor appetite for Kazakhstan’s biggest state-owned companies, which the government planned to list as part of a privatization campaign.

BALANCING ACT

Nazarbayev steered his nation, which is five times the size of France in area, to independence from Moscow in 1991. He has since managed to maintain close ties with Russia, the West, and China, Kazakhstan’s giant eastern neighbor.

Nazarbayev won 97.7 percent of the vote in the last presidential election in 2015. International observers have long judged elections in Kazakhstan to be neither free nor fair.

Nazarbayev tolerated no dissent or opposition and was criticized by rights groups who accused him of locking up his critics and muzzling the media, allegations he denied.

His government recently pushed through a number of popular policies - including raising public-sector salaries and forcing utilities to cut or freeze tariffs - stoking speculation that he was preparing for a re-election bid.

Members of Nazarbayev’s family have stakes in some of Kazakhstan’s most lucrative assets, including Halyk Bank and firms in sectors ranging from telecoms to fuel trading.