LUXEMBOURG (Reuters) - Greece welcomed on Friday a deal on new bailout loans as a decisive step to exiting its debt crisis and markets took heart by lowering Greek borrowing costs, even though Spanish and German officials raised last-minute objections.

Euro zone governments threw Greece another credit lifeline on Thursday and sketched some new detail on possible debt relief as the IMF finally offered to join the bailout after two years of hesitation.

The 8.5 billion euros ($9.5 billion) of new loans from the euro zone’s 18 other states lets Athens avoid defaulting on bailout repayments next month and recognises the unpopular cuts and reforms the left-wing government has made.

Berlin backed the loans even though it is wary of easing terms for Greece ahead of a German election in September.

Greek Prime Minister Alexis Tsipras hailed the deal on Friday as Greece’s 10-year government bond yield fell to its lowest for almost a month on the news.

“It was a decisive step, for the country exiting from this crisis. It was a clear step of confidence for the markets,” Tsipras said.

But the deal was not enough for the European Central Bank to include Greece in its government bond-buying program for now, as the ECB needed more clarity on what kind of debt relief Greece will get from its international creditors.

“It’s a very positive step in the right direction but you need to see more clarity on debt to include Greece,” an official close to the issue said.

Euro zone ministers, under pressure from the International Monetary Fund, said on Thursday they could in 2018 extend the average maturities of Greek loans and grace periods by up to 15 years. The average maturity now is 30 years.

Greek Prime Minister Alexis Tsipras (L) welcomes French Finance Minister Bruno Le Maire at his office in Maximos Mansion in Athens, Greece, June 12, 2017. REUTERS/Costas Baltas

But this was not enough for either the IMF or the ECB, with the Fund deciding to wait with disbursements to Greece until the euro zone provides more clarity on debt relief.

NEW OBSTACLES

Spanish Finance Minister Luis De Guindos unexpectedly cast a pall over the agreement on Friday by saying Madrid would block the disbursement to Greece unless Athens grants immunity to privatization agency officials from Spain, Italy and Slovakia, charged over a sale and lease-back deal of 28 state-owned buildings in Greece in 2015.

“If there’s not a definitive solution for the situation of these three experts, the Eurogroup will block the payment,” de Guindos said in Luxemburg where European Union finance ministers hold monthly talks.

EU officials said they were convinced the issue would be resolved quickly and not impact the disbursement after all, but they also noted that euro zone ministers stood behind Spain, Italy and Slovakia on the issue.

A senior lawmaker from Germany’s center-left Social Democrats also added to the uncertainty by calling for a full parliamentary debate on the deal, in a challenge to Finance Minister Wolfgang Schaeuble who deems such a debate unnecessary.

Social Democrat lawmaker Johannes Kahrs believes the IMF’s decision to delay its own disbursements despite joining the bailout is a major change to the deal and needs the approval of the whole German parliament.

Schaeuble said on Thursday that it would be up to the budget committee of the Bundestag to decide whether full parliamentary approval was needed, but that he did not believe the deal was a substantive change.

A vote in the Bundestag could embarrass conservative Chancellor Angela Merkel as some of her lawmakers oppose aid to Greece ahead of German elections in September.

Altogether 63 German conservative lawmakers voted against the third bailout for Greece in August 2015 and a further three abstained.