New York

Despite strong results from industrial companies, U.S. stocks couldn’t get any momentum going Tuesday after carmakers said their sales are shrinking.

Engine maker Cummins sent manufacturers and other industrial companies higher after reporting solid first-quarter earnings. A late slump took the price of oil to its lowest price in almost six months. Ford, General Motors and Fiat Chrysler all fell after they said sales declined in April.

Chris Zaccarelli, chief investment officer for Cornerstone Financial Partners, said auto sales have weakened because lenders are growing a bit hesitant to make loans to help people buy cars.

“It’s more a story specific to the auto sector as opposed to a slowdown in consumer spending,” he said.

Thanks to an upturn in the last few minutes of trading, the Standard & Poor’s 500 index rose 2.84 points, or 0.1 percent, to 2,391.17. The Dow Jones industrial average added 36.43 points, or 0.2 percent, to 20,949.89. The Nasdaq composite set another record as it picked up 3.76 points, or 0.1 percent, to 6,095.37. The Russell 2000 index of small-company stocks sank 8 points, or 0.6 percent, to 1,399.36.

The six largest automakers in the U.S. all said their sales fell in April. Vehicle sales have set records the last few years and analysts are worried the streak is ending and car companies are relying too much on discounts and incentives to keep their sales numbers high.

Ford lost 50 cents, or 4.4 percent, to $10.92 and GM gave up $1, or 2.9 percent, to $33.20 while Fiat Chrysler skidded 49 cents, or 4.3 percent, to $10.92. Car retailers, rental companies and parts suppliers slipped as well.

Industrial companies made some of the biggest gains. Cummins reported a far bigger profit and better sales than analysts expected, and its stock climbed $9.23, or 6.1 percent, to $160.56. The company said demand from construction and mining sales grew compared with the same period a year ago, but truck production in North America fell.

Benchmark U.S. crude lost $1.18, or 2.4 percent, to $47.66 a barrel in New York. That’s its lowest price since mid-November. Brent crude, used to price international oils, shed $1.06, or 2.1 percent, to $50.46 a barrel in London.

Health care stocks shook off an early loss. Merck climbed after it reported strong sales of newer medications including its cancer drug Keytruda and hepatitis C drug Zepatier, and its stock gained 32 cents to $62.70. Hospital chain Tenet Healthcare jumped $3.31, or 21.6 percent, to $18.66 after it agreed to sell three hospitals to HCA Holdings for $725 million and said it will rejoin insurer Humana’s network.

Technology stocks rose further. The S&P 500’s technology index, which includes 69 major companies, is at its highest levels since March 2000, the peak of the dot-com boom.