UPDATE 3-European stocks hit over 4-month highs after EU recovery fund sealed

(For a live blog on European stocks, type LIVE/ in an Eikon news window)

* German stocks touch February highs on tech sector boost

* Adevinta jumps on $9.2 bln deal to buy eBay’s classifieds unit

* Randstad gains on smaller-than-expected drop in core earnings

* Novartis, BHP down after earnings (Updates to close)

July 21 (Reuters) - European shares closed above four-month highs on Tuesday, with Germany’s blue-chip DAX erasing almost all its losses for the year, after EU leaders agreed on a landmark stimulus package to revive the bloc’s economies from a coronavirus-induced slump.

The pan-European STOXX 600 jumped as much as 1.3% before ending 0.3% higher at its highest since early March, as did an index of euro zone blue-chip stocks which rose 0.5%.

Oil stocks were the biggest boost, also marking their best session since early March, as crude prices surged.

The global mood also brightened on growing optimism about a COVID-19 treatment after promising early data from trials of three potential vaccines.

European Union leaders clinched a “historic” deal in the early hours of Tuesday on a 750-billion-euro ($856 billion)recovery fund and its related 1.1-trillion-euro budget for 2017-2021 that they hope will help repair the continent’s deepest recession since World War Two.

“It will add to the foundation of the current bull market,” said Teeuwe Mevissen, senior macro strategist at Rabobank.

“It will have a long-term impact in the sense that if the European Union finds itself in a similar situation in the future, then markets will expect that governments will come to the rescue.”

Germany’s DAX gained 1% finishing at five-month highs, boosted by tech major SAP SE.

A gauge of European stock market volatility sank to its lowest since Feb. 25.

Spain and Italy, among the south European countries set to benefit from the EU deal, saw their main indexes gain 0.2% and 0.5% respectively.

Eyes are now on likely U.S. aid legislation aimed at supporting its economy.

Topping the STOXX 600 index was Adevinta which soared 26% after U.S. firm Ebay Inc agreed to sell its classified ads business to the Norwegian group in a deal worth $9.2 billion.

In earnings-driven moves, Randstad Holding jumped almost 9% after the staffing company reported a smaller-than-expected drop in quarterly core earnings.

The biggest drag on the STOXX 600 was Novartis, down 1.9% after the drugmaker trimmed its 2020 sales forecast as coronavirus related disruptions hit its quarterly revenue.

Europe’s healthcare index was the worst sectoral performer, down 1% with AstraZeneca also declining after a University of Oxford researcher flagged uncertainty about rolling out its possible COVID-19 vaccine - licensed to AstraZeneca, by the end of the year.

London’s FTSE 100 ended flat with shares of mining giant BHP also sliding 2.6% after it warned of risk to demand.

Reporting by Sruthi Shankar in Bengaluru; Editing by Shounak Dasgupta and Susan Fenton