The blue-chip FTSE 100 index <.FTSE> was up 0.8 percent at 6,729.99 points by 1411 GMT, with advances in banks - highly geared to market declines - adding the most points to the index.

"I was 'long' on the market last week, betting that a Greek deal would be reached, and the agreement on Greece has had a natural, positive kick-on effect for the banks," Central Markets trading analyst Joe Neighbour said.

Shawbrook (>> Shawbrook Group PLC) and HSBC (>> HSBC Holdings plc) were the top risers within the sector, gaining between 3.7 and 2.1 percent respectively.

News of a deal with creditors was met with a measure of relief mixed with much anger in Greece, after it became clear the country will have to swallow more austerity in what some see as Berlin's attempts to humiliate Athens as a punishment for its resistance to another round of cuts.

"It's generally seen by the markets at the moment as a done deal, but clearly there will be some sort of political wranglings about this both domestically for Tsipras and his party and within the euro zone region as well," said London Capital Group analyst Brenda Kelly.

In individual stocks, British Airways' owner International Consolidated Airlines Group (IAG) (>> International Consolidated Airlns Grp SA) was the biggest gainer of the day in percentage terms, rising 3.5 percent after UBS upgraded the stock to "buy" from "neutral".

Also among the risers, supermarkets Morrison (>> WM Morrison Supermarkets PLC), Tesco (>> Tesco PLC), Marks and Spencer (>> Marks and Spencer Group Plc) and Sainsbury (>> J Sainsbury plc) added between 3.1 and 1.8 percent.

"It is very much a relief rally, with a huge bend towards the defensive, and that is a lot of the reason why supermarkets are benefiting today," Kelly said.

Among mid caps, speciality chemical maker Alent (>> Alent PLC) soared as much as 45 percent to a record high after a bid from U.S. peer Platform Specialty (>> Platform Specialty Products Corp), pushing the FTSE 350 Chemicals Index <.FTNMX1350> 2.6 percent higher.

On the downside, International Personal Finance (>> International Personal Finance Plc) plummeted 24 percent on proposed revisions to a credit amendment law in Poland, one of its biggest markets.

The FTSE 100 is up by about 2 percent since the start of 2015, although the index is down 6 percent from a record high of 7,122.74 points reached in April.

(Additional reporting by Sudip Kar-Gupta; Editing by Andrew Roche)

By Liisa Tuhkanen