The plan must now be approved by the Athens parliament by Wednesday, and then voted through various national parliaments. If agreement is reached, talks can then begin towards a a new three-year bailout worth up to €86bn (£61bn), accompanied by further monitoring by Greece’s creditors.

The deal appears to end Greece’s five-month battle with its creditors, which has gripped the eurozone, dominated the political agenda and alarmed the markets.

Stock markets around Europe have welcomed the tentative deal reached in Brussels this morning.

The eurozone’s blue-chip Euro STOXX 50 index hit a two-week high in morning trading and is currently up around 2%. Banking stocks in particular are benefiting from the relief rally and the eurozone banking index is up 2.7%.

Euro Stoxx Photograph: Thomson Reuters

Individual country bourses are also higher:

Germany’s DAX is up 1.7%

France’s CAC 40 is up 2.2%

UK’s FTSE 100 is up 0.7%

On bond markets, the yields on those bonds seen as most vulnerable to a Greek exit from the euro fell back on relief the crisis could be nearing resolution. The yields on the 10-years bonds of Italy, Spain and Portugal all fell back.On foreign exchange markets, the euro initially rallied against other major currencies before easing back as traders looked beyond intitial positive headlines out of Brussels and considered the hurdles still to come this week. The single currency is now down around 0.7% against the dollar at $1.108 and 1.2% against the pound at 71.120 pence.

Euro vs dollar Photograph: Thomson Reuters

Analysts warn there are plenty of potential stumbling blocks ahead this week to unsettle markets.

“We argued last week that likely Grexit would be avoided this weekend. And at this time ... it looks like it will be avoided, but the days ahead are full of opportunities for it to materialise. We remain in the path of Grexit and everything needs to go perfect to avoid it. We likely need a cabinet reshuffle in Greece. Then the Greek government needs to pass seven packages before Wednesday just to open the door to start negotiations for a new programme. It also needs to propose more reforms in several fronts. After all this happens, then talks about a new (third) package can start, assuming other national parliaments agree to do so...

We still think there is room for a positive resolution, but even the best case scenario is a deal with many conditions and very gradual disbursements, which will have substantial implementation risks because of no ownership.”

Italy’s prime minister Matteo Renzi told at a press conference in Brussels that there were moments during the marathon talks when he would have bet that negotiations would fail.

“But today instead we have taken a decisive stop forward.”

“At many moments, a deal could not be taken for granted. We should not toast triumphantly about it, nor should we diminish it,” he said, adding that there was still much work left to be done.

He denied that Germany “alone” was in charge of Europe. While he acknowledged that the Germans had a “different approach”, he said it was one he respected because it represented the will of a democratically elected government and that the overnight talks has been a “real discussion”.

Renzi also acknowledged that he supported keeping the fund that will hold Greek assets in Athens, not Luxembourg, saying that such a move would have been “a humiliation”.

The new measures Greece must now implement

The final Euro Summit statement confirms that Greece has agreed to immediately implement sweeping measures, after a bruising battle in Brussels:

This includes pension reforms, liberalising its economy (from Sunday opening hours to opening up closed professions), privatising its energy transmission network, reforming its labour market practices (including new rules on industrial action, and collective dismissals), and action on non-performing loans:

That is on top of the austerity its MPs agreed on Friday:

Here are the key points:

carry out ambitious pension reforms and specify policies to fully compensate for the fiscal impact of the Constitutional Court ruling on the 2012 pension reform and to implement the zero deficit clause or mutually agreeable alternative measures by October 2015;

adopt more ambitious product market reforms with a clear timetable for implementation of all OECD toolkit I recommendations, including Sunday trade, sales periods, pharmacy ownership, milk and bakeries, except over-the-counter pharmaceutical products, which will be implemented in a next step, as well as for the opening of macro-critical closed professions (e.g. ferry transportation). On the follow-up of the OECD toolkit-II, manufacturing needs to be included in the prior action;

on energy markets, proceed with the privatisation of the electricity transmission network operator (ADMIE), unless replacement measures can be found that have equivalent effect on competition, as agreed by the Institutions;

on labour markets, undertake rigorous reviews and modernisation of collective bargaining, industrial action and, in line with the relevant EU directive and best practice, collective dismissals, along the timetable and the approach agreed with the Institutions. On the basis of these reviews, labour market policies should be aligned with international and European best practices, and should not involve a return to past policy settings which are not compatible with the goals of promoting sustainable and inclusive growth;

adopt the necessary steps to strengthen the financial sector, including decisive action on non-performing loans and measures to strengthen governance of the HFSF and the banks, in particular by eliminating any possibility for political interference especially in appointment processes.

And on top of that, Greece will also establish a new fund to sell off valuable assets to help repay its new bailout, and refinance its banks.

Or as the statement put it:

develop a significantly scaled up privatisation programme with improved governance; valuable Greek assets will be transferred to an independent fund that will monetize the assets through privatisations and other means. The monetization of the assets will be one source to make the scheduled repayment of the new loan of ESM and generate over the life of the new loan a targeted total of €50bn of which €25bn will be used for the repayment of recapitalization of banks and other assets and 50% of every remaining euro (i.e. 50% of €25bn) will be used for decreasing the debt to GDP ratio and the remaining 50% will be used for investments.

Analyst: It's Merkel 1, Tsipras 0

Demetrios Efstathiou of ICBC Standard Bank says that Greece has been comprehensively routed by Germany in Brussels this weekend:

Tsipras had to concede on almost every point.

Merkel comes out as a winner, and should be able to get the deal though the German parliament.

Germany’s extremely tough position would serve as a warning to other Eurozone nations. There are arguments that she even pushed too far.

Varoufakis may have gambled, Tsipras and Syriza may have lost, but Greece may be the ultimate winner - Greece has a golden opportunity to implement in record time the drastic reforms that it desperately needed and which successive governments have been unwilling to commit to.

The formation of a national unity or special purpose government to pass the reforms in the tight time-frame is now required. Elections would have to follow at a later stage.

The debate will now move on to the reaction of the Greek people. There is no easy answer. Only time will tell. The way I see it is that the Greek people will be relieved to see their banks reopen, their pensions and savings to be still denominated in euros, and the tourist season not destroyed. They should also be celebrating the implementation of structural reforms, but I doubt that.

Greece must now push through parliament, by Wednesday, July 15th, a series of legislations that include the streamlining of the VAT system, and pension measures.

Nick Malkoutzis (@NickMalkoutzis)

#Tsipras gov't has to pass 4 bills by Wed & another 2 by July 22, which is probably more than its legislated since Jan election win #Greece