NEW YORK (TheStreet) -- Stocks managed to shake off the worst of the day's losses to end just slightly lower thanks to the energy sector, the sole sector component in the S&P 500 to close with gains. Wall Street had been pressured earlier by a continued selloff of government bonds, though Treasury yields did pull back from six-month highs hit in the morning session.

The Dow Jones Industrial Average was down 180 points at session lows. By close, the blue-chip index was down just 0.21%, or 37 points. The S&P 500 was down 0.3%, and the Nasdaq declined 0.35%.

Crude oil rallied to $60 a barrel as the dollar weakened on the global bond rout. The price surge seemingly ignored a Goldman Sachs report which estimated the global oil market will be oversupplied by 1.9 barrels a day this quarter.

"Today's rally is sponsored in part by yesterday's drilling productivity report in the U.S. from the EIA, which points to a drop in U.S. oil production at a couple of key shale plays next month," said Matt Smith, commodity analyst at Schneider Electric. "This bullish influence is in conjunction with a sliding U.S. dollar amid a strong selloff in global bond markets and equity markets too."

Major oilers Exxon Mobil (XOM), Chevron (CVX), BP (BP), and Statoil (STO) were slightly higher, while the Energy Select Sector SPDR ETF (XLE) gained 0.46%.

U.S. bond yields hit their highest level since November earlier Tuesday. The yield on the 10-year Treasury note climbed to 2.26% during the session; the yield earlier reached 2.29%.

Global bonds have endured a rocky week as a number of macro forces have come to a head: Crude oil has hovered around $60 a barrel, the eurozone has increased its inflation expectations as fresh stimulus enters the market, and Greek debt talks appear to be inching along at an agonizing pace.

"The rise in yields in part stems from growing fears surrounding Europe's potential recovery with worries the ECB's QE program will fall short, as well as lingering concerns surrounding a potential Greek default and/or exit from the EU," explained Sterne Agee chief economist Lindsey Piegza.

Meanwhile, San Francisco Federal Reserve President John Williams said that he wants the U.S. central bank to start raising rates "a bit earlier" so that increases can be gradual.

"I see a safer course in a gradual increase, and that calls for starting a bit earlier," Williams said in a speech to the New York Association for Business Economics.

The number of job openings in the U.S. fell from 14-year highs in March as hiring and the number of Americans leaving jobs increased, according to the Labor Department's Job Openings and Labor Turnover Survey. Job openings fell to 4.994 million on the final day of March from 5.144 million in February. Economists had expected a reading of 5.158 million.

Rackspace Hosting (RAX) led losses in the technology sector, tumbling after quarterly revenue missed estimates. Second-quarter sales guidance also disappointed as currency headwinds undermined top-line growth.

Other tech losers included Google (GOOGL), Facebook (FB), Intel (INTC), and Oracle (ORCL). The Technology SPDR ETF (XLK) fell 0.34%.

AOL (AOL) shares rocketed nearly 20% higher after Verizon (VZ) agreed to buy the company for $50 a share. The deal is valued at a total $4.4 billion. The acquisition will bolster Verizon's move into digital platforms with AOL acting as a separate entity under the Verizon umbrella.

Lumber Liquidators (LL) slipped on reports the embattled company is being denied coverage by its insurers. The flooring company has been hit with lawsuits over the safety of its products.

Gap (GPS) was lower after missing quarterly revenue estimates. The retailer reported first-quarter revenue down 3% as the stronger dollar hit its top-line.

Pall (PLL) surged on reports the manufacturer of filtration systems is in the late stages of an auction. A potential sale to Danaher (DHR) or Thermo Fisher Scientific (TMO) could value the company at more than $10 billion.

More from Markets

Dow and Nasdaq Finish Lower as 10-Year Treasury Yield Hovers Near 3%

Dow and Nasdaq Finish Lower as 10-Year Treasury Yield Hovers Near 3%

Video: Stop Using Student Loan Money to Buy Bitcoin

Video: Stop Using Student Loan Money to Buy Bitcoin

Let the Najarian Brothers Crash-Proof Portfolio

Let the Najarian Brothers Crash-Proof Portfolio

Facebook Sends Facial Recognition Notification in Error

Facebook Sends Facial Recognition Notification in Error

3 Hot Reads From TheStreet's Top Premium Columnists

3 Hot Reads From TheStreet's Top Premium Columnists