By Sruthi Shankar and Ambar Warrick

European stocks closed higher on Tuesday, shrugging off uncertainty over regional bond purchases as a swathe of positive earnings and an easing of coronavirus lockdown restrictions in some countries caused some optimism.

The pan-European STOXX 600 index closed about 2.2% higher.

Germany's top court ruled earlier on Tuesday that the Bundesbank must stop buying bonds under the European Central Bank's stimulus scheme if the ECB cannot justify the purchase.

German shares closed 2.5% higher and shares in Italy, whose debt is particularly vulnerable to changes in the ECB's bond-buying scheme, added 2%.

"(The court ruling) doesn't apply to the Pandemic Emergency Purchase Programme, so therefore it shouldn't be that great a problem at this moment in time," said Craig Erlam, Senior Market Analyst, OANDA Europe.

"Broadly speaking this wasn't necessarily a bad reading as far as the quantitative easing scheme was concerned. It suggested that the legality of it - as the ECB has always suggested - was perfectly okay."

Still, bank stocks <.SX7P>, which are more exposed to ructions in the sovereign debt space, ended the day off session highs.

Total SA gained 7.9% after it maintained its dividend despite reporting a sharp fall in first-quarter net adjusted profit due to a plunge in oil prices. Spain's Repsol topped the STOXX 600 after its first-quarter profit beat expectations.

Europe's oil and gas sector led gains among regional sectors for the day, as crude prices surged on expectations that fuel demand will begin to recover as some U.S. states and countries in Europe and Asia start to ease measures imposed to try to curb the spread of the coronavirus. [O/R]

"There is some hope that things are starting to get back to normal, and the rally in oil is helping some confidence back in the markets," said Keith Temperton, a sales trader at Tavira Securities.

European shares are hovering near two-month highs on massive stimulus measures and hopes that the coronavirus may have peaked in certain U.S. and European hotpots.

Among other companies that reported, German meal-kit delivery firm HelloFresh surged nearly 10% after it raised its 2020 forecast -- continued lockdowns have boosted its first-quarter performance in international markets.

Copenhagen-based jewellery maker Pandora jumped 8.3% after saying it was encouraged by higher online sales and the reopening of stores in Germany and some other countries.

Among decliners, Swedish real estate firm Samhallsbyggnadsbolaget fell 18% and was at the bottom of the STOXX 600 after the company said its chief executive, Ilija Batljan, had been detained for allegedly violating market abuse regulations.

(Reporting by Sruthi Shankar in Bengaluru and Joice Alves in London; Editing by Anil D'Silva and Timothy Heritage)