Greece missed the second debt payment to the International Monetary Fund in two weeks today, despite having reached agreement with official creditors on a new bailout programme earlier in the day.

Athens was supposed to remit €450m to the crisis lender but it had not been expected to make the payment after missing a €1.5bn debt payment to the fund on 30 June.

Greece's arrears to the IMF now total about €2bn said spokesman Gerry Rice in a statement confirming the missed payment.

When it first defaulted at the end of June, the IMF froze Greece's access to its resources, including the fund's ongoing financing program for the country.

Athens asked the IMF for a rare extension of the repayment period, which was not ruled on at the time.

"The request by the Greek authorities for an extension of the repayment obligation due on June 30th is expected to be discussed by the Executive Board in the coming weeks," said Mr Rice.

Meanwhile, the banks in Greece will remain closed for at least two more days, despite the deal to secure a third bailout reached after 17 hours of talks in Brussels.

Greek Prime Minister Alexis Tsipras has flown back to Athens to try to get the controversial bailout deal he secured from creditors through parliament.

It came as anger mounted at more painful austerity measures that could fracture his government. He said Greece secured debt restructuring and medium-term financing in a package worth €35 billion.

He has until Wednesday night to quell dissent within his own ranks and get unpopular measures passed that include higher value added tax and pension reforms.

Speaking in Brussels after agreement was reached, Mr Tsipras said the deal could bring new investment to help the country pull itself out of recession and avoid the collapse of its banking system.

"The deal is difficult but we averted the pursuit to move state assets abroad. We averted the plan for a financial strangulation and for the collapse of the banking system," Mr Tsipras told reporters after marathon talks.

"In this tough battle, we managed to win a debt restructuring," he said.

Mr Tsipras said Greece fought "to the end" for the deal.

German Chancellor Angela Merkel has warned that Greece and its European partners still faced a challenging road ahead to finalise what would be a third bailout for for the country.

"The road will be long, and judging by the negotiations tonight, difficult," Ms Merkel told reporters, after bailout talks ended after more than 17 hours.

Ms Merkel said she would recommend "with full conviction" to parliament to authorise the opening of negotiations on a third bailout once the Greek parliament approves the programme and enacts initial laws.

Ms Merkel would not say when that would happen but said she would give a positive report to a parliamentary committee this week.

It was better not to recall politicians from the summer recess until they were sure the Greek laws had been passed, she said.

European Commission President Jean-Claude Juncker has ruled out any possibility of Greece leaving the euro after the deal was agreed.

Meanwhile, a Greek public service union has called for a 24-hour strike for Wednesday.

Adedy called for the stoppage on the day parliament is to vote on the bailout package, saying it was against the agreement with the eurozone.

Taoiseach Enda Kenny said the marathon summit talks were a "pretty bruising experience" but he believed the deal "will allow the Greek economy to thrive and prosper and continue to remain a member of the eurozone."

Speaking after the summit concluded, Mr Kenny added "This is a challenging position for Greece, a very challenging position. But it is one the Prime Minister himself has said he is up for."

Asked what was in the deal for the Greek people, the Taoiseach said: "What's in this for Greece is the potential to grow their economy and bring it back to a point of stability - where growth, investment and jobs can be created."

On the decision to guarantee the IMF was involved in the third bailout, despite a Greek desire to make it only optional, Mr Kenny said "their involvement in terms of their ability and experience in assessing values and conditions is accepted."

He added he welcomed "that agreement had been reached. It does start off the critical need for the rebuilding of trust."

Tánaiste Joan Burton has said she is relieved there is an outline of an agreement between the Greek government and EU leaders which will now be referred to the Greek parliament.

She said it would offer a path to help Greece in relation to its humanitarian crisis and growth. Ms Burton said it was important to see normal economic life resume.

She also accused Sinn Féin of sloganeering and twisting and turning on the issue of a Greek default, saying Sinn Féin may favour a default but they had stupidly voted for the bank guarantee.

Commenting on the outcome of the summit, Sinn Féin President Gerry Adams said the "conduct of a number of EU governments over the past number of weeks has been alarming.

"They have effectively closed down the Greek banking system and held the Greek government and people to ransom."

Mr Adams also criticised the Irish Government, saying "It is obscene for Fine Gael, Labour and Fianna Fáil to lecture the Greek people while generations of Irish people will be paying off debts that are not of their making.

"The decision is now with the Greek government and parliament. I wish them well in their deliberations."

British Prime Minister David Cameron has said the task of implementing a deal between Greece and their eurozone leaders is a task that should not be underestimated.

Mr Cameron said: "We are glad an agreement has been reached but there is still more to do."

Meanwhile, the deal has sparked a backlash on social media, with the hashtag #ThisIsACoup being used on Twitter to criticise the deal.

Prominent commentators such as Paul Krugman, the Nobel-winning economist who writes for the New York Times, helped propel the term into the mainstream.