Stocks gave up an early rally and closed slightly lower Thursday as traders turned cautious over escalating tensions between the U.S. and China.

The S&P 500 had been up 1.1% before sinking in the last hour after President Donald Trump said he would hold a news conference on China Friday. The announcement came a day after China’s legislature endorsed a national security law for Hong Kong that has strained relations with the U.S. and prompted new protests.

On Wednesday:

The S&P 500 index fell 6.40 points, or 0.2%, to 3,029.73.

The Dow Jones Industrial Average lost 147.63 points, or 0.6%, to 25,400.64.

The Nasdaq composite slid 43.37 points, or 0.5%, to 9,368.99.

The Russell 2000 index of small company stocks dropped 35.69 points, or 2.5%, to 1,400.67.

For the week:

The S&P 500 is up 74.28 points, or 2.5%.

The Dow is up 935.48 points, or 3.8%.

The Nasdaq is up 44.40 points, or 0.5%

The Russell 2000 is up 45.14 points, or 3.3%.

For the year:

The S&P 500 is down 201.05 points, or 6.2%.

The Dow is down 3,137.80 points, or 11%.

The Nasdaq is up 396.38 points, or 4.4%

The Russell 2000 is down 267.80 points, or 16.1%.