U.S. stock indexes closed up strongly Tuesday on encouraging data on the U.S. economy and housing market. The broad rebound followed even bigger gains in Europe as global markets recovered from a two-day rout triggered by Britain’s vote to leave the European Union.

At the close on Wall Street, the Dow Jones industrial average was up 269.5 points, about 1.6 percent, at 17,409.7. The Standard & Poor’s 500 index rose 35.6 points, about 1.8 percent, to 2,036.1. The Nasdaq composite added 97.4 points, about 2.1 percent, to 4,691.9.

As markets closed, benchmark U.S. crude rose $1.65, about 3.6 percent, to close at $47.98 a barrel in New York. In London, Brent crude, used to price international oils, gained $1.49, about 3.2 percent, to $48.65 a barrel.

Oil and gas companies led the rally as energy futures prices rose. Banks and other financial companies, which took the heaviest losses in the sell-off, also surged. Health care, consumer and technology stocks also notched gains. Bond prices fell, sending yields higher.

European benchmarks rose even more. Britain’s FTSE 100 and France’s CAC 40 each gained 2.6 percent. Germany’s DAX added 1.9 percent.

The euro and the British pound were moving higher, though the pound remained near its lowest levels since 1985.

Uncertainty and anxiety over the economic fallout from Britain’s vote to leave the European Union has roiled global financial markets since Friday and prompted ratings agencies to slash their top-shelf credit rating for the U.K.

advertisement | advertise on newsday

Investors appeared to shake off their some of their jitters Tuesday. British Prime Minister David Cameron has signaled he might not trigger a clause setting in motion the U.K.’s exit from the EU before October.

In the United States, a new batch of economic data helped put traders in a buying mood.

The Commerce Department raised its estimate of U.S. economic growth in the first three months of the year. Separately, a key gauge of home values showed U.S. home prices climbed in April, hitting record highs in several cities. In addition, The Conference Board said its measure of U.S. consumer confidence increased this month to the highest level since October.

“Obviously, the market isn’t very receptive to uncertainty, but in some ways this uncertainty is providing the possibility and the consideration that what happened in the U.K. isn’t necessarily reflective of, or an indicator of, a recession, especially here in the U.S. as well as globally,” said analyst W. Janet Dougherty, a global investment specialist at J.P. Morgan Private Bank.

Bond prices fell. The yield on the 10-year Treasury note rose to 1.45 percent from 1.44 late Monday.