Stocks closed out their worst week of the year Friday as traders worried that President Donald Trump’s escalating trade war with China could damage the economy.

Technology stocks came under the heaviest selling pressure, while safe-play stocks did relatively well as investors went on the defensive. Oil prices turned higher a day after their biggest plunge in more than four years.

On Friday:

The S&P 500 fell 21.51 points, or 0.7%, to 2,932.05.

The Dow Jones Industrial Average dropped 98.41 points, or 0.4%, to 26,485.01.

The Nasdaq composite lost 107.05 points, or 1.3%, to 8,004.07.

The Russell 2000 index of smaller companies gave up 17.11 points, or 1.1%, to 1,533.66.

For the week:

The S&P 500 fell 93.81 points, or 3.1%.

The Dow dropped 707.44 points, or 2.6%.

The Nasdaq lost 326.14 points, or 3.9%.

The Russell 2000 slid 45.31 points, or 2.9%.

For the year:

The S&P 500 is up 425.20 points, or 17%.

The Dow is up 3,157.55 points, or 13.5%.

The Nasdaq is up 1,368.80 points, or 20.6%.

The Russell 2000 is up 185.10 points, or 13.7%.