The major U.S. stock indexes wavered between small gains and losses in late-afternoon trading Wednesday even as the market remained on track to mark the longest bull run in history. Gains in technology stocks, retailers and energy companies outweighed losses in industrial firms and elsewhere in the market.

KEEPING SCORE: The S&P 500 index was essentially flat, losing a single point and dropping to 2,862 at closing time. The Dow Jones Industrial Average slid 89 points, or 0.3 percent, to 25,734. The Nasdaq composite gained 30 points, or 0.4 percent, to 7,889. The Russell 2000 index of smaller-company stocks picked up 1 point, or 0.1 percent, to 1,720. Gainers held a slight edge on decliners on the New York Stock Exchange.

BULL MARKET: On Tuesday, the S&P 500 index briefly traded at an all-time high just as the U.S. stock market’s bull run came closer to becoming the longest on record. The current bull market, which began in 2009, is on track to become the longest in history on Wednesday, surpassing the bull run of the 1990s.

ROOM TO RUN: While the current bull market is the longest on record, it lags others on the basis of magnitude, or the cumulative gain it has generated for investors.

As of Tuesday, the S&P 500 had climbed 323 percent over the current bull market. By comparison, the bull market that ran through much of the 1990s and ended in March 2000, when the dot-com bubble burst, led to a 417 percent gain for the S&P 500, according to S&P Dow Jones Indices.

“While it’s long in time, it could still go on longer because, magnitude-wise, it’s just not that far (along),” said Jason Pride, chief investment officer for private clients at Glenmede.

FED CLOSEUP: Investors got a closer look at the discussions held by Federal Reserve policymakers during their most recent meeting on interest rate policy earlier this month. The minutes of their discussions revealed deepening concerns that escalating trade wars could hurt the economy. The minutes also underscored expectations that the central bank is likely to increase its policy rate at its next meeting in September. Many economists believe another rate hike will follow in December.

The afternoon release of the minutes didn’t have much of an impact on the market, which continued to trade in a narrow range.

Later this week, central bankers, including new Fed chief Jerome Powell, gather in Jackson Hole, Wyoming, an annual symposium that has often generated market-moving news.

TECH REBOUND: Technology sector stocks reversed course after an early slide. Nvidia gained 3.4 percent to $261.92.

BULLSEYE: Target climbed 2.2 percent to $85.12 after the retailer reported earnings that came in ahead of analysts’ forecasts. The company also raised its annual forecasts, citing stronger online and in-store sales.

WELL-BUILT: Lowe’s jumped 5.8 percent to $105.56 after the home-improvement chain’s latest quarterly results topped Wall Street’s estimates.

WHAT A DRAG: Industrial stocks took some of the heaviest losses. American Airlines Group lost 2.5 percent to $39.31.

MAKING THE DEAL: Hartford Financial Services Group slid 4.2 percent to $50.13 after the insurance and financial services company said it will buy insurance underwriter Navigators for $70 a share, or $2.08 billion.

ENERGY: U.S. benchmark crude climbed 3.1 percent to $67.87 per barrel in New York. Brent crude, the standard for international oil prices, dipped 0.1 percent to $74.70 per barrel in London.

The pickup in oil prices helped boost energy sector stocks. Marathon Oil gained 3.5 percent to $20.92.

BOND YIELDS: Bond prices rose. The yield on the 10-year Treasury fell to 2.82 percent from 2.84 percent late Tuesday.

CURRENCIES: The dollar rose to 110.57 yen from 110.40 yen late Tuesday. The euro strengthened to $1.1587 from $1.1574.

METALS: Gold rose 0.3 percent to $1,203.30 an ounce. Silver fell 0.1 percent to $14.75 an ounce. Copper slid 0.7 percent to $2.69 a pound.

MARKETS OVERSEAS: In Europe, Germany’s DAX was flat, while France’s CAC 40 edged up 0.2 percent. The FTSE 100 index of leading British shares added 0.1 percent. In Asia, Japan’s benchmark Nikkei 225 closed 0.6 percent higher. Australia’s S&P/ASX 200 lost 0.3 percent. South Korea’s Kospi rose 0.1 percent. Hong Kong’s Hang Seng added 0.6 percent.

© The Associated Press. All rights reserved.