To avert a sovereign default, Greece, the other Eurozone members, and the International Monetary Fund agreed on a rescue package which involved giving Greece an immediate € in loans, with additional funds to follow, totaling €. To secure the funding, Greece was required to adopt harsh austerity measures to bring its deficit under control. A second bail-out amounting to € ($) was agreed in 2012, subject to strict conditions, including financial reforms and further austerity measures. A debt haircut was also agreed as part of the deal. Greece achieved a primary government budget surplus in 2013, while in April 2014, it returned to the global bond market. Greece returned to growth after six years of economic decline in the second quarter of 2014, and was the Eurozone's fastest-growing economy in the third quarter. A third bailout was agreed in July 2015, after a confrontation with the newly elected government of Alexis Tsipras.