The pan-European STOXX 600 <.STOXX> index closed 0.7 percent higher, while the FTSE gained 0.6 percent and Germany's DAX <.GDAXI> was up 0.5 percent.

"Greece and their creditors have reached an agreement concerning the next tranche of bailout money which should be supportive for stocks as it removes some uncertainty going forward," City of London Markets trader Markus Huber said.

Euro zone governments threw Greece another 11th-hour credit lifeline worth 8.5 billion euros (7.44 billion pounds) late on Thursday and sketched new detail on possible debt relief as the IMF finally offered to help out after two years of hesitation.

Greek stocks <.ATG> rose 0.8 percent to a two-year high, with some analysts saying they expected any debt relief deal to unlock more value from Greek stocks.

European retailers <.SXRP>, however, extended their slide from the previous session, reaching a two-month low after Amazon (>> Amazon.com) said it would buy U.S. organic supermarket chain Whole Foods (>> Whole Foods Market, Inc.) and worries of increased competition hit the sector.

Shares in Dutch supermarket chain Ahold Delhaize (>> Ahold Delhaize) dropped 9.5 percent, and Tesco (>> Tesco) ended 4.9 percent lower after rising in early deals.

Tesco, Britain's biggest retailer, released a first-quarter update that showed UK like-for-like sales growth of 2.3 percent that beat analyst expectations. But it later pared gains as its weak international same-store sales overshadowed the strong UK performance.

The retail sector in Europe suffered sharp falls in the previous session, when H&M (>> Hennes & Mauritz) sales disappointed and UK data showed consumers were feeling the impact of rising inflation.

Nestle (>> Nestlé) made strong gains, leading the food and beverage sector <.SX3P> with a three-percent rise after saying it might sell its $900 million-a-year U.S. confectionery business, in a move that Morgan Stanley said was a "clear positive" following disappointment earlier this year when the group ditched its sales target.

Italian banks <.FTIT8300> were a weak spot, after news that investment funds Fortress (>> Fortress Investment Group LLC) and Elliott had dropped out of talks to buy troubled Italian lender Monte dei Paschi's (>> Banca Monte dei Paschi di Siena SpA) bad loans.

Shares in Bper Banca (>> Banca Popolare Emil Romagna) and Banco BPM (>> Banco BPM) were among the biggest fallers, while Spain's Bankia (>> Bankia SA) was hit by a downgrade from Barclays. The banking sector <.SX7P> was up just 0.1 percent, paring earlier gains.

European shares ended lower for the second straight week, as worries over slowing economic growth and rich valuations halted a rally that brought the STOXX near two-year highs in May.

(Editing by Andrew Roche)

By Danilo Masoni and Kit Rees