NEW YORK (AP) -- Stock indexes inched upward Tuesday, led by gains in energy companies as the price of oil closed above $50 a barrel for the first time in almost a year.
The market had been on track for its highest close since last July, but an afternoon stumble erased most of the early rally, leaving broad indicators with meager gains for the day.
Slumping bond yields increased the appeal of high-dividend stocks, sending prices for phone companies higher. Health care stocks sank as a series of poor results from clinical trials knocked drugmakers lower.
The Dow Jones industrial average held onto a gain of 17.95 points, or 0.1 percent, to 17,938.28. The Dow was up as much as 82 points earlier.
The S&P 500 rose 2.72 points, or 0.1 percent, to 2,112.13. The Nasdaq composite, which is heavily weighted with biotech companies, lost 6.96 points, or 0.1 percent, to 4,961.75.
Benchmark U.S. crude oil added 67 cents, or 1.3 percent, to $50.36 a barrel in New York. Oil hasn't closed at $50 a barrel or higher since July 21. Brent crude, which is used to price international oils, added 89 cents, or 1.8 percent, to $51.44 a barrel in London.
Among energy companies, Chevron rose $2.15, or 2.1 percent, to $103.32 while Newfield Exploration added $1.87, or 4.7 percent, to $41.81. Helmerich & Payne gained $2.61, or 4 percent, to $67.35.
The dollar plunged following Friday's jobs report as investors concluded that the Fed won't raise interest rates any time soon. That has helped energy companies by putting upward pressure on the price of crude oil. Industrial companies have also had a good run.
"When you get a Fed that is now perceived to be lower for longer (on interest rates), with a dollar that is less likely to rally, and an economy that may be slowing but is not in recession, that has tended to be a positive for those stocks in 2016," said Julian Emanuel, U.S. equities and derivatives strategist for UBS.
Bond prices rose, sending the yield on the 10-year U.S. Treasury note down to 1.72 percent from 1.74 percent. That made bonds less appealing, and sent income-seeking investors into phone company stocks. Verizon added $1.04, or 2.1 percent, to $51.75.
Two biotech drugmakers tumbled after important drugs failed in clinical testing. Biogen, which makes several treatments for multiple sclerosis, said a potential drug called opicinumab failed in a mid-stage clinical trial. Its stock dropped $36.98, or 12.8 percent, to $252.86.
Alexion Pharmaceuticals said a study of its drug Soliris failed, and its stock lost $16.86, or 10.9 percent, to $138.13. The company gets almost all of its revenue from Soliris, which is approved to treat two rare blood disorders, and an additional approval could have strengthened its sales. Both Biogen and Alexion have plunged by about one-third since July.
Canadian drugmaker Valeant Pharmaceuticals disclosed its delayed quarterly results and cut its profit and revenue estimates for the year. Its stock gave up $4.21, or 14.6 percent, to $24.64, and it's down 90 percent since mid-September.
Banks took more losses, as the prospect of lower interest rates suggested diminished profits. Goldman Sachs lipped $1.89, or 1.2 percent, to $155.17 and Morgan Stanley gave up 33 cents, or 1.2 percent, to $26.52.
Organic and specialty foods distributor United Natural Foods posted a larger-than-expected profit in its fiscal third quarter, and the company raised its projections for the year. Its stock jumped $5.45, or 14 percent, to $44.28.
Real estate information website Zillow said will pay $130 million to settle a lawsuit brought by competitor Move Inc. Move, which is owned by News Corp., said Zillow hired two of its executives and obtained trade secrets that helped the Zillow buy another rival, Trulia, in 2014. Move said it would seek as much as $1.8 billion in damages. Zillow Group stock gained $1.74, or 5.7 percent, to $32.07.
Surgical implant maker Zimmer Biomet said it will buy spine surgery products maker LDR Holding for $1 billion, or $37 per share. LDR jumped $14.41, or 63.8 percent, to $36.99 and Zimmer fell $2.11, or 1.7 percent, to $119.43.
Metals prices hardly budged. Gold fell 40 cents to $1,247 an ounce. Silver slipped 5 cents to $16.39 an ounce. Copper fell 1 cent to $2.05 a pound.
In other energy trading, wholesale gasoline held steady at $1.59 a gallon. Heating oil added 4 cents to $1.54 a gallon. Natural gas gained 1 cent to $2.47 per 1,000 cubic feet.
Overseas, Germany's DAX rose 1.6 percent and the CAC-40 in France was up 1.2 percent. The FTSE 100 index of leading British shares edged up 0.2 percent. Japan's Nikkei 225 rose 0.6 percent and South Korea's Kospi gained 1.3 percent. Hong Kong's Hang Seng Index rose 1.4 percent.
The dollar slipped to 107.31 yen from 107.40 yen. The euro fell to $1.1361 from $1.1373.