The deal is a lifeline for the country which is facing its worst economic crisis in over 70 years.