Slovenia was on Thursday scrambling to convince international lenders that it can avoid following Hungary's footsteps, after the leader of the country's largest party failed to form a government.

MPs rejected the centre-left Zoran Jankovic as new prime minister, despite calls for a new government to deal with the country's increasing debt and threats of a further cut to its sovereign debt rating.

Slovenia, which was the first post-communist country to join the euro in 2007, was downgraded A1 from Aa3 in December by ratings agency Moody's. Officials fear that political uncertainty and reliance on exports to the EU will trigger a further downgrade and a steep rise in borrowing costs. The country is already being forced to borrow at rates above 7%.

Jankovic, whose Positive Slovenia party gained the most votes at a snap election in December, needed the support of at least 46 out of 90 parliamentary members but only managed to gain the support of 42.

The president and members of parliament now have up to 14 days to nominate new candidates with Janez Jansa, head of the centre-right Slovenian Democratic Party, the second strongest party in parliament, the most likely to win.

Michal Dybula, an economist at BNP Paribas in Warsaw, said: "The longer it takes, the bigger the risk to public finances, the current account, the financial channels and the real economy because of the absence of a government."

The risk for Slovenia is "a further widening of debt spreads and that financing costs, not only for the government but the whole economy, are going to continue to rise at a rapid pace".

German and Italian banks have a large presence in the country and encouraged a lending boom beforethe 2008 financial crash. Moody's believes a severe contraction in the activities of EU banks will hurt Slovenian growth prospects. The banking sector has total assets of about 136% of national GDP, emphasising its importance to the country's economic expansion.

In 2007, not long after it joined the euro, the European Central Bank warned Slovenia that a prolonged spending binge risked an economic crash.

The country, which has a population of 2 million, was badly hit by the global crisis and its economy shrank by 8% in 2009. After a mild recovery in 2010, recent data showed that another recession was possible, as the economy contracted by 0.5% in the third quarter of 2011.

Jansa, who was prime minister from 2004 to 2008, has pledged to cut the budget deficit, speed up privatisation and selectively raise the retirement age.

Slovenia's political crisis started in September, when parliament ousted the centre-left government of prime minister Borut Pahor over internal coalition squabbles and its inability to enforce reforms that would speed up economic growth.

All of the main credit agencies have cut Slovenia's ratings since September and put it on a negative watch. Fitch said last week that Slovenia needed to form a new government urgently and come up with a plan to narrow its budget deficit to maximise its chance of averting another rate cut.