European stocks shook off a four-day slump, finishing in positive territory, supported by a surge in technology stocks and an improvement in sentiment regarding Spain.

Spain's IBEX 35 index gained 0.6% to 6726.90 while the benchmark Stoxx 600 index closed 0.8% higher at 255.60, following four consecutive sessions closing in the red. Spain's 10-year government bond yield eased below the 7% mark, a level considered too high for the government to handle over the long term.

Prices on Spanish debt rose, sending the yield on 10-year government debt down 0.23 percentage point to 6.78%, according to Tradeweb, an electronic trading platform. The rally came after European finance ministers late Monday reached a deal to make €30 billion ($36.9 billion) in aid available by the end of the month as the first tranche of the bailout of the Spanish banking sector.

The group has also given Spain extra time to hit a target for reducing its budget deficit.

However, the euro struggled to hang on to gains against the dollar after Italy's Prime Minister Mario Monti said that while the country wouldn't need a Greek-style bailout, it wouldn't necessarily be opposed to the European Stability Mechanism buying Italian bonds. He added that it wouldn't be prudent to say Italy would never need help.

Early afternoon in New York, the euro was at €1.2253, falling from the session's high of $1.2334. Late on Monday, the euro was at $1.2313.

German's DAX finished up 0.8% at 6438.33 and France's CAC-40 gained 0.6% to end at 3175.41. The U.K.'s FTSE 100 finished 0.7% higher at 5664.07. The index was helped by news that industrial production increased by 1.0% between May and April, the biggest monthly increase since March 2010.

Italy's FTSE Mib index increased 0.4% to 13868.27, falling from a session high of 14102.87 after the comments from Mr. Monti. Greece's ASE Composite fell by 3.3% to 621.69, dragged down by weakness in the banking sector.

The governor of Greece's central bank noted that bank deposits were returning at a "satisfactory pace," but the inflows come after Greeks withdrew a record €8.5 billion in May. National Bank of Greece slid 8.8% and Piraus Bank fell 7.7%.

The technology sector gained from news that Intel agreed to pay as much as $3.1 billion for a stake of up to 15% in the Netherlands' ASML. Intel will also provide ASML with about $1 billion in research-and-development funding. The Dutch maker of semiconductor equipment surged 8.6%.

Oil firms rose as Norway's government decided to stop a strike by workers in the oil industry, averting a lockout that was planned for midnight Tuesday. Shares of Norwegian oil group Statoil rose 1.9%.

As European stock markets closed, light, sweet, crude for August delivery was down $0.88 or 1.0% at $85.11 on the New York Mercantile Exchange. Gold for August delivery on the Comex division of Nymex declined $4.60, or 0.3%, to $1,584.50 per ounce.

Write to Michele Maatouk at