Technology companies led U.S. stocks higher Wednesday in a broad rally that helped nudge the Dow Jones industrial average to a new high.

In remarks before Congress, Federal Reserve Chair Janet Yellen raised the possibility that the central bank would consider slowing the pace of its interest rate increases if inflation remained persistently below its target level.

The move assuaged concerns among some traders worried that the Fed has been moving too quickly to raise interest rates despite a slowdown in inflation and the U.S. economy’s sluggish growth of just 1.4 percent in the first quarter.

Yellen’s remarks put investors in a buying mood and sent bond yields lower, stoking demand for real estate companies, utilities and other high-dividend paying stocks. Materials companies also posted hefty gains.

“Investors would prefer lower interest rates, particularly if the economy isn’t gaining the kind of traction that would warrant a faster rate-hike path,” said Quincy Krosby, chief market strategist at Prudential Financial. “This is positive for the markets.”

The Standard & Poor’s 500 index gained 17.72 points, or 0.7 percent, to 2,443.25. The Dow rose 123.07 points, or 0.6 percent, to 21,532.14, a record high. The average, which had been up more than 171 points, last set a record high on June 19.

The Nasdaq composite added 67.87 points, or 1.1 percent, to 6,261.17. The Russell 2000 index of smaller-company stocks picked up 11.27 points, or 0.8 percent, to 1,424.32.

The stock market looked poised for a big move early on, climbing in premarket trading as investors began to size up Yellen’s prepared remarks, which were released ahead of her testimony.

The indexes opened higher across the board and stayed in the green the rest of the day. All 11 sectors in the S&P 500 index notched gains.

In her semiannual testimony before the House Financial Services Committee, Yellen said the central bank expects to keep raising a key interest rate at a gradual pace, and raised the possibility that the pace of rate hikes would be slower than previously expected should inflation remain below its target level of 2 percent annual growth.

Many economists believe the Fed, which has raised rates three times since December, will increase rates one more time this year.

Yellen’s remarks suggest the central bank may not need to raise interest rates as much as the market has been expecting, said Rob Haworth, senior investment strategy director at U.S. Bancorp Wealth Management.

“By holding rates lower, that means capital or investment remains somewhat cheaper for companies and the economy should be able to do well with rates perhaps not rising as much as some of us had feared,” Haworth said.

Yellen also said she plans to start trimming the Fed’s massive bond holdings this year.

The yield on the 10-year Treasury note fell to 2.32 percent from 2.37 percent late Tuesday. Yields affect rates on mortgages and other consumer loans.

Technology companies led the market higher. PayPal gained $1.79, or 3.3 percent, to $56.55. Nvidia rose $6.63, or 4.3 percent, to $162.51. Activision Blizzard added $3.04, or 5.2 percent, to $61.02.

Real estate investment trusts and other high-dividend paying stocks benefited from rising bond prices, which pulled bond yields lower. Crown Castle International rose $1.76, or 1.8 percent, to $100.05. American Tower climbed $2.95, or 2.3 percent, to $133.88.

NRG Energy was the biggest gainer in the S&P 500. It soared 29.4 percent after the company said it plans to raise up to $4 billion through asset sales in order to lower its debt. The stock climbed $4.79 to $21.09.

Several airlines also rose after American Airlines Group and United Continental reported solid results for June. American Airlines gained $2.19, or 4.2 percent, to $53.80. United Continental picked up $3.61, or 4.7 percent, to $80.53. Delta Air Lines rose $1.20, or 2.2 percent, to $55.48.

Oil prices wavered early Wednesday, but recovered following a report showing that U.S. crude oil inventories declined sharply last week.

Benchmark U.S. crude rose 45 cents, or 1 percent, to settle at $45.49 per barrel on the New York Mercantile Exchange. Brent crude, used to price international oils, gained 22 cents, or 0.5 percent, to close at $47.74 per barrel in London.

Major stock indexes in Europe also posted solid gains Wednesday.

Germany’s DAX up 1.5 percent, while France’s CAC 40 gained 1.6 percent. Britain’s FTSE 100 rose 1.2 percent.

Markets in Asia finished mostly lower. Japan’s Nikkei 225 fell 0.5 percent and South Korea’s Kospi lost 0.2 percent. Hong Kong’s Hang Seng index rose 0.6 percent.

The dollar fell to 113.25 yen from 113.84 yen late Tuesday. The euro weakened to $1.1416 from $1.1476.

Gold rose $4.40 to $1,219.10 an ounce. Silver added 14 cents to $15.89 an ounce. Copper inched up 1 cent to $2.68 a pound.

In other energy trading, wholesale gasoline was little changed at $1.52 a gallon. Heating oil slipped less than 1 penny to $1.47 a gallon. Natural gas fell 6 cents, or 2 percent, to $2.99 per 1,000 cubic feet.