U.S. markets stabilized and ended higher Thursday after an early swoon brought on by Russia’s invasion of Ukraine.

Technology stocks in particular rebounded strongly. Oil prices had surged earlier but ended with moderate gains. Markets in Europe, whose economy has closer ties to Russia, ended lower as traders worried the conflict could further disrupt supply chains.

On Thursday:

The S&P 500 rose 63.20 points, or 1.5%, to 4,288.70.

The Dow Jones Industrial Average rose 92.07 points, or 0.3%, to 33,223.83.

The Nasdaq rose 436.10 points, or 3.3%, to 13,473.59.

The Russell 2000 index of smaller companies rose 51.91 points, or 2.7%, to 1,996.

For the week:

The S&P 500 is down 60.17 points, or 1.4%.

The Dow is down 855.35 points, or 2.5%.

The Nasdaq is down 74.48 points, or 0.5%.

The Russell 2000 is down 13.33 points, or 0.7%.

For the year:

The S&P 500 is down 477.48 points, or 10%.

The Dow is down 3,114.47 points, or 8.6%.

The Nasdaq is down 2,171.39 points, or 13.9%.

The Russell 2000 is down 249.31 points, or 11.1%.