Ante Markovic, the last prime minister of socialist Yugoslavia whose efforts to save its economy with aggressive liberalisation failed as the country disintegrated into civil war, died on Monday at 87.

Croatia's HINA news agency said he died in the Croatian capital, Zagreb.

A Croat born in Bosnia, Markovic became prime minister of Yugoslavia in 1989 and instituted economic shock therapy for its sinking socialist economy, including wage controls and a fixed exchange rate of the dinar, while allowing citizens to buy foreign currency freely in banks.

The policies helped to rein in rampant inflation and made Markovic one of the most popular politicians in the country, but he was ultimately undone by economic warfare between the constituent republics.

The start of his premiership will be remembered as the last period of optimism and hope in the SFRJ (Socialist Federal Republic of Yugoslavia), the Bosnian daily Dnevni Avaz wrote on its website.

Markovic remained powerless and politically isolated as rising nationalism tore the federation apart. He quit his post and politics in December 1991.

He briefly returned to the spotlight in 2003 when he gave evidence against Slobodan Milosevic at the former Serb strongman's war crimes trial in The Hague.

Markovic told the court that Milosevic and late Croatian leader Franjo Tudjman had drawn up plans to divide Bosnia between them at a meeting in 1991, before war broke out in Bosnia.

Milosevic died before in 2006 before the end of his trial.

(Writing by Matt Robinson; Editing by Zoran Radosavljevic and David Stamp)