NEW YORK (TheStreet) -- Stocks extended slight gains on Thursday as crude oil topped $60 a barrel, triggering a rally among energy companies. 

The S&P 500 was up 0.18%, the Dow Jones Industrial Average rose 0.03%, and the Nasdaq added 0.34%.

Crude oil added to Wednesday's gains as commodity traders cheered data that showed a further decline in U.S. oil inventories. The Energy Information Administration reported Wednesday a fall of 2.7 million barrels in crude supplies for the week ended May 15. Analysts had expected a drop of 2 million barrels. West Texas Intermediate added 2.3% to $60.31 a barrel. 

BP (BP) - Get BP p.l.c. Sponsored ADR Report was more than 1% higher after settling with Halliburton (HAL) - Get Halliburton Company (HAL) Report and Transocean (RIG) - Get Transocean Ltd. Report over claims related to the 2010 Gulf of Mexico oil spill. Transocean will get $125 million compensation for legal claims, though will have to pay nearly double that into a fund compensating victims of the spill. Transocean gained 4.1% while Halliburton climbed 1.9%. 

Other winners in the energy sector included Chevron (CVX) - Get Chevron Corporation Report, Schlumberger (SLB) - Get Schlumberger NV Report, and Petrobras (PBR) - Get Petroleo Brasileiro SA Sponsored ADR Report. The Energy Select Sector SPDR ETF (XLE) - Get Energy Select Sector SPDR Fund Report added 0.9%. 

U.S. manufacturing activity slowed in May, according to Markit's manufacturing purchasing index. The headline reading of 53.8 was down from 54.1 in April, while new orders growth slowed to its slowest pace since January 2014. 

"The May flash PMI is consistent with our expectation that the domestic manufacturing sector will continue to face headwinds from the lagged effects of stronger dollar and lower energy prices," said Barclays analyst Jesse Hurwitz in a note.

Existing U.S. home sales fell 3.3% in April to an adjusted annual rate of 5.04 million, falling back from March highs as prices rose, according to the National Association of Realtors. Economists had expected an April rate of 5.24 million. 

The Philadelphia Fed Business Outlook fell to a reading of 6.7 in May from 7.5 a month earlier. Economists had expected the measure to tick up to 8. 

Fed minutes from the central bank's April meeting were released on Wednesday and showed that many on the Fed board saw a June rate hike as unlikely, with only a few members supporting an increase next month.

TheStreet Recommends

Initial jobless claims for the week ended May 15 climbed 10,000 to a four-week high of 274,000. Economists had expected claims to climb to 269,000. The measure, however, remained near 15-year lows.

Best Buy (BBY) - Get Best Buy Co., Inc. Report surged more than 5% after earning 37 cents a share in its recent quarter, above forecasts of 29 cents. Revenue of $8.56 exceeded estimates of $8.46 billion. (CRM) - Get, inc. Report was also moving higher after posting quarterly net income of 16 cents a share, well above estimates of 2 cents. Revenue climbed 23% to $1.51 billion, only slightly higher than forecasts.

CVS (CVS) - Get CVS Health Corporation Report was on the move after confirming it will buy Omnicare (OCR) for $98 a share or $12.7 billion. The purchase is expected to close by the end of the year.

Lumber Liquidators (LL) - Get Lumber Liquidators Holdings, Inc. Report plummeted more than 14% after CEO Robert Lynch resigned. Founder Thomas Sullivan will assume the CEO position. The company has been in strife for months since a 60 Minutes report accused the company of unsafe flooring products.

Airline stocks were moving higher, recovering from two days of losses. The sector was shaky after Southwest Airlines (LUV) - Get Southwest Airlines Co. Report said it would increase capacity, fueling concerns carrier growth could outpace travel demand. Click here to read more.

Southwest is one of the top 10 companies in the S&P 500 expected to have the biggest earnings growth this year, according to S&P Capital IQ. Click here to read more.

Hewlett-Packard (HPQ) - Get HP Inc. (HPQ) Report, Aeropostale (ARO) , Gap (GPS) - Get Gap, Inc. (GPS) Report, and Lions Gate Entertainment (LGF) are scheduled to report earnings after the bell. 

HP said Thursday it plans to sell a majority stake in its China data networking business to a subsidiary of Tsinghua Holdings. Click here to read more.

Chinese markets shot higher on hopes the People's Bank of China will introduce further monetary stimulus as the manufacturing sector continued to contract. The HSBC Flash Manufacturing PMI increased to 49.1 in May, up from 48.9 in April though it remained under 50 which signals contraction.

European markets were mixed after eurozone PMI data disappointed. Markit Economics' purchasing managers' indices for May came in below expectations, with the composite PMI index declining to a three-month low of 53.4. German figures disappointed, while French data came in ahead of expectations. Click here for more.