NEW YORK (AP) -- U.S. stock indexes ticked closer to record heights on Tuesday, but the modest moves belied plenty of churning underneath.
Oil prices and energy stocks slumped to give back nearly half of their huge gains from a day earlier. Rising prices for technology stocks and companies that sell to consumers, though, more than made up for those losses. Treasury yields fell a second straight day as the Federal Reserve opened a two-day meeting on interest rates, where investors expect it to announce a cut for the second time in as many months.
The S&P 500 rose 7.74 points, or 0.3%, to 3,005.70. It's back to within 0.7% of its record set in late July.
The Dow Jones Industrial Average rose 33.98, or 0.1%, to 27,110.80, and the Nasdaq composite gained 32.47, or 0.4%, to 8,186.02.
"We're drifting here a little bit," said David Joy, chief market strategist at Ameriprise Financial. "It's interesting to me, and somewhat encouraging, that the market has held up near its all-time highs despite all these concerns."
The newest of those concerns arrived this past weekend, when an attack on a Saudi Arabian oil facility raised the risk of major disruptions to the world's oil supply. Crude surged more than 14% on Monday, about as much as it did when Iraq invaded Kuwait before the 1991 Gulf War, and concern rose that spiraling oil prices would act as a huge, de facto tax imposed around the world.
But benchmark U.S. crude slumped $3.56 to $59.34 per barrel Tuesday, giving up close to half of its surge from a day earlier. Saudi Arabia's energy minister said that half of the production cut by the attack has already been restored. Brent crude, the international standard, fell $4.47 to $64.55.
That led to a 1.5% loss for energy stocks in the S&P 500, the sharpest among the 11 sectors that make up the index. Marathon Oil dropped 7.8%, and oilfield services provider Halliburton gave up 6.5%.
The drop in oil, though, helped companies carrying big fuel bills recoup some of their sharp losses from the day before. American Airlines Group rose 3.1%, for example, and clawed back about 40% of its loss from Monday.
Technology stocks also made modest gains, including Microsoft's 0.8% rise and Micron Technology's 1.4% climb.
Stocks that pay big dividends, including utilities and real-estate investment trusts, were among the market's leaders as a drop in interest rates made their payouts more attractive.
Investors still largely expect the Fed to cut short-term interest rates by another quarter of a percentage point Wednesday. The central bank cut rates in late July for the first time in more than a decade as it tries to shield the United States from the pain of a slowing global economy and the effects of the trade war with China.
Several economic reports have come in recently that are "good enough" to mean it's no longer a slam dunk that the Fed will cut rates Wednesday, Ameriprise's Joy said. Tensions in the trade war between the world's two largest economies, which has been the No. 1 concern for investors around the world, have seemed to diminish a bit recently, and representatives from Washington and Beijing are scheduled to talk next month. But Joy and many others still expect the Fed to cut Wednesday and perhaps again later this year, similar to the trio of cuts it implemented in 1995-1996 and again in 1998 as part of a "mid-cycle adjustment" in the 1991-2001 economic expansion.
The yield on the 10-year Treasury fell to 1.80% from 1.84% late Monday. The two-year yield, which is more heavily influenced by changes in Fed policy, fell to 1.72% from 1.75%.
Wholesale gasoline fell 8 cents to $1.68 per gallon. Heating oil declined 9 cents to $1.99 per gallon. Natural gas fell 1 cent to $2.67 per 1,000 cubic feet.
Gold rose $1.90 to $1,513.40 per ounce, and silver rose 11 cents to $18.14 per ounce. Copper fell 1 cent to $2.63 per pound.
The dollar rose to 108.20 Japanese yen from 108.05 yen on Monday. The euro strengthened to $1.1066 from $1.1006.
In markets abroad, France's CAC 40 rose 0.2%, and Germany's DAX lost 0.1%. The FTSE 100 in London was virtually flat.
Japan's Nikkei 225 added 0.1%, and South Korea's Kospi was virtually flat. The Hang Seng in Hong Kong dropped 1.2% after credit-rating agency Moody's downgraded Hong Kong, citing its recent political turmoil.