Wall Street turned around on news BP reached a tentative agreement to open an escrow fund demanded by US President Barack Obama, halting a slide sparked by data showing US housing starts fell more than expected in May.

The euro was little changed against the dollar as the rebound in US stocks offset fresh concerns about Spain's credit and banking system outlook. For details see:

A lower euro and declining US stocks earlier in the session had given government debt prices a boost, as a tight correlation between bond and stock prices continued to dominate markets.

European shares closed up higher as early gains in the oil sector offset a slide in Nokia shares after it issued a profit warning, saying profitability at its key phones unit would be weaker than expected this quarter.

Nokia dropped 8.9 percent, wiping about 2.7 billion euros ($3.3 billion) off its market capitalization.

The MSCI world equity index rose 0.3 percent after hitting its highest level since mid-May earlier in the session. The MSCI emerging markets index rose 0.7 percent.

The pan-European FTSEurofirst 300 index of top shares closed up 0.2 percent at 1,039.25 points.

US housing starts were also weak and that is going to weigh on market sentiment to a degree."

Before 1 p.m., the Dow Jones Industrial Average was down 17.76 points, or 0.17 percent, at 10,387.01. The Standard & Poor's 500 Index was down 1.08 points, or 0.10 percent, at 1,114.15. The Nasdaq Composite Index was up 1.40 points, or 0.06 percent, at 2,307.28.

Oil rebounded on the BP escrow news, rising from below $77 a barrel after a US government inventory report showed crude inventories posted an unexpected increase last week.

The US Energy Information Administration (EIA) said crude inventories rose 1.7 million barrels last week, against expectations that stockpiles would be down 1.2 million barrels.

US crude for July rose 81 cents to $77.75 a barrel.

ICE Brent crude for delivery in August rose $1.32 to $78.12.

The euro's rebound this week lost steam after the premium investors demand to hold 10-year Spanish government bonds over German bunds hit a euro life high on a report that the European Union, the International Monetary Fund and the US Treasury were drawing up a liquidity plan for Spain.

The European Commission denied the report.

Spanish banks' reliance on European Central Bank funding increased to record levels in May, according to RBS research.

Worries about the Spanish banking sector drove investors to the safety of the euro zone's benchmark bund debt, with 10-year spreads on Greek, Portuguese, Irish and Italian debt widening.

The Spanish 10-year yield shot up 14 basis points to a near two-year high of 4.94 percent.

The benchmark 10-year US Treasury note was up 8/32 in price to yield 3.28 percent, pushed higher by data that showed housing starts fell 10 percent in May to a five-month low. Starts in April were revised lower.

"The housing start numbers weren't great, and you have the concerns about Spain and other euro zone countries' debt situation," said Kurt Brunner, portfolio manager at Swarthmore Group in Philadelphia.

Gold fell $5.80 to $1,227.60 after earlier gains.

Industrial metal prices also fell from two-week highs, as the weak US housing data stoked concerns about the demand outlook for copper.

Home construction plunged last month and building permits also fell, the latest signs that the construction industry won't fuel the US economic recovery.

Builders are scaling back now that government incentives have expired. The biggest evidence of that trend: single-family homes tumbled 17 percent, the largest monthly drop since January 1991. The struggle in the housing industry is a concern for the broader economy because fewer homes mean fewer jobs across various sectors.

Overall new homes and apartments fell 10 percent in May to a seasonally adjusted annual rate of 593,000, the Commerce Department said Wednesday. April's figure was revised downward to 659,000. Applications for new building permits — a sign of future activity — sank 5.9 percent to an annual rate of 574,000. That was the lowest level in a year.

Output at the nation's factories, mines and utilities climbed 1.2 percent in May, the Federal Reserve said Wednesday.

Factories, the single biggest contributor to industrial activity, ratcheted up production 0.9 percent.Production at utilities increased 4.8 percent as warm weather created more demand for electricity. Mining was the only component that lagged.

Wholesale prices actually fell for a second straight month in May. But the 0.3 percent dip in May was pulled down by a 7 percent drop in gasoline prices and a 7.4 percent fall in home heating oil prices. Core inflation, which excludes energy and food, rose 0.2 percent in May and is up just 1.3 percent over the past 12 months.