Greece unexpectedly averted a recession in the second quarter when the country and its creditors haggled over the release of bailout funds. Gross domestic product expanded 0.3 percent in the three months through June after shrinking a revised 0.1 percent in the previous quarter, the Hellenic Statistical Authority said in an e-mailed statement on Friday. The median estimate in a Bloomberg survey was for a 0.2 percent drop. Greece and its creditors spent much of the first half of the year in talks over measures such as pension reform and budget savings needed to unlock funds from the nation’s rescue package. The government says the 10.3 billion euros ($11.5 billion) in loans tied to that aid review will help the economy by paying off arrears, counterbalancing the new taxes that hit Greeks in June. The country’s GDP data is subject to frequent revision, and the quarterly contraction in the three months through March was corrected to 0.1 percent from 0.5 percent. GDP fell 0.7 percent from a year earlier in the second quarter, its fourth straight decline, according to Friday’s data. The Bank of Greece has said it expects the economy to contract 0.3 percent this year before growing 2.5 percent in 2017. Sales-tax increases helped keep Greece’s European Union-harmonized inflation rate at 0.2 percent in July for a second month, the statistics authority said earlier this week. It was the first time since 2012 that the index rose in consecutive months.