NICHOLAS PAPHITISATHENS, Greece (AP) â¿¿ European and global financial leaders have agreed to release â¿¬44 billion ($57 billion) in critical loans to Greece and provide billions in additional debt relief in order to help the country stabilize its ailing economy. After three weeks of negotiations, Greece's euro partners and the International Monetary Fund agreed early Tuesday morning to release the loans in four installments beginning next month. The leaders also settled on a raft of measures â¿¿ including a debt buyback program and an interest rate cut on loans â¿¿ that will reduce the country's debts by about â¿¬40 billion. Greek Prime Minister Antonis Samaras hailed the agreement in Brussels as a victory. "Yesterday, a very grey, a very dark time for Greece ended definitively," he said in a televised address to the nation, adding that the agreement "managed to ensure us remaining in the euro." But the country will still face years of economic pain as austerity measures agreed to as part of the bailout package are implemented. Most stock markets in Europe were modestly higher on the news out of Brussels with the Stoxx 50 index of leading European shares closing up 0.2 percent. Meanwhile the euro gave up earlier gains to trade 0.4 percent lower at $1.2941. The interest rate charged on Greece's benchmark 10-year bonds, an indicator of investor confidence in a country's finances, fell 0.2 percentage points to 14.47 percent on the news of the debt deal. "There remains the potential for this deal to fall apart in the medium term as there are a lot of moving parts and it is a long way away from the permanent fix that the IMF had been insisting upon," said Gary Jenkins, managing director of Swordfish Research. "It is just one more big kick of the can down the road."