A last-minute surge nudged US stock indexes mostly higher last night, 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.
"You have a lot of risk assets, especially equities, having done pretty well," said Sameer Samana, global quantitative strategist for Wells Fargo Investment Institute.
"Some people are viewing now as a pretty good time to make sure they lock in some of that performance."
The S&P 500 index rose 0.84 points, or 0.03%, to 2,562.10.
The Dow added 5.44 points, or 0.02%, to 23,163.04.
The Nasdaq composite slid 19.15 points, or 0.3%, to 6,605.07.
The Russell 2000 index of smaller-company stocks gave up 3.10 points, or 0.2%, to 1,502.04.
Slightly more stocks rose than declined on the New York Stock Exchange.
Investors bid up shares in drug manufacturers and other health care companies.
Envision Healthcare led the sector, vaulting 4.43 dollars, or 10.9%, to 45.08 dollars.
Gilead Sciences rose 1.58 dollars, or 2%, to 81.59 dollars.
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% after it reported earnings that beat financial analysts' estimates and raised its outlook.
The stock added 4.05 to 90.10 dollars.
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%, to 49.21 dollars.
Adobe Systems surged 12.2% 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 dollars.
Other technology stocks did not fare as well.
Apple had its worst day in two months amid investor concern that its recently launched iPhone 8 models are lagging in market share compared to prior iPhone models.
The stock finished down 3.78, or 2.4%, at 155.98 dollars. Despite the slide, Apple is still up 34.7% this year.
The slide in Apple and other technology companies weighed on the market for much of the day. The sector, which is leading all other sectors in the S&P 500 with a gain of 30 percent this year, recovered some of its losses by late afternoon.
United Continental sank 12.1% 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 dollars to 59.78 dollars.
- AP