Indexes close higher on a slow day

A last-minute surge nudged U.S. stock indexes mostly higher Thursday, barely extending the market's winning streak and milestone-setting run.

The Standard & Poor's 500 index and Dow Jones industrial average closed higher for the fifth straight day, each posting new highs. The other indexes finished slightly lower as investors continued to pore through the latest batch of company earnings.

Technology companies weighed on the market all day, but gains in health-care stocks helped offset some of those losses.

The S&P 500 index rose 0.84 points, or 0.03 percent, to 2,562.10. The Dow added 5.44 points, or 0.02 percent, to 23,163.04. The Nasdaq composite slid 19.15 points, or 0.3 percent, to 6,605.07. The Russell 2000 index of smaller-company stocks gave up 3.10 points, or 0.2 percent, to 1,502.04.

Investors bid up shares in drug manufacturers and other health-care companies.

Envision Healthcare led the sector, vaulting $4.43, or 10.9 percent, to $45.08. Gilead Sciences rose $1.58, or 2 percent, to $81.59. A subsidiary of the drugmaker received approval this week to sell a new treatment for a form of blood cancer.

Medical equipment maker Danaher jumped 4.7 percent after it reported earnings that beat financial analysts' estimates and raised its outlook. The stock added $4.05 to $90.10.

Verizon Communications' latest quarterly results also impressed traders. The company said its wireless unit gained more mobile phone users than expected in its latest quarter. Its stock rose 56 cents, or 1.2 percent, to $49.21.

Adobe Systems surged 12.2 percent after the software maker issued a strong profit forecast for 2018. The stock was the biggest riser in S&P 500, climbing $18.73 to $171.73.

Apple had its worst day in two months amid investor concern that its recently launched iPhone 8 models are lagging in market share compared with prior iPhone models. The stock finished down $3.78, or 2.4 percent, at $155.98. Despite the slide, Apple is still up 34.7 percent this year.

United Continental sank 12.1 percent after the parent of United Airlines said that weak prices will continue the rest of this year. The stock was the biggest decliner in the S&P 500, tumbling $8.21 to $59.78.

Auto parts retailer Genuine Parts slumped 8.5 percent after the company said costs rose and its quarterly profit fell short of Wall Street's estimates. The stock lost $8.33 to $89.71.

Benchmark U.S. crude lost 75 cents, or 1.4 percent, to settle at $51.29 per barrel on the New York Mercantile Exchange. Brent crude, used to price international oils, fell 92 cents, or 1.6 percent, to $57.23 per barrel in London.

Gold rose $7 to $1,290 an ounce. Silver added 26 cents to $17.26 an ounce. Copper lost 1 cent to $3.17 a pound.

The dollar fell to 112.65 yen from 112.90 yen on Wednesday. The euro rose to $1.1830 from $1.1802.