The United States will safeguard its national security, even if it comes at an economic cost to its relationship with China, US Treasury Secretary Janet Yellen said on Thursday.

The federal government will address any national security concerns through export controls, sanctions and by restricting foreign investments, Yellen said.

In a speech at the Johns Hopkins School of Advanced International Studies, Yellen outlined three objectives of the US relationship with China: prioritizing national security and defending human rights, promoting a healthy and fair economic relationship with China and cooperating with China to address global issues.

Yellen’s remarks come at a time when tensions with China remain high, a few months after a Chinese spy balloon flew across the continental United States. Beijing’s role on the world stage, especially when it comes to the war in Ukraine, has also been a growing concern for US officials. The Biden administration is also expected to lay out restrictions on American companies investing in China, which would escalate tensions further.

Economic policymakers at this month’s World Bank Spring Meetings also expressed concerns at China’s lending practices. A study published last month showed that China spent $240 billion to bail out 22 countries between 2008 and 2021, including Argentina, Pakistan, Kenya and Turkey. That’s in addition to the loans China has given to countries in Asia, Africa and Europe to fund infrastructure megaprojects.

TikTok, which is owned by a Beijing-based parent company, has also come under scrutiny for its ties with China as governments around the world have banned the social media app for national security reasons, though there still isn’t any public evidence that the Chinese government has spied on people through TikTok.

And while Yellen has criticized China in the past, her speech on Thursday took on a more hawkish tone by underscoring that the United States is not afraid to take action when it comes to national security.

“Even though these policies may have economic impacts, they are driven by straightforward national security considerations,” said Yellen, a former Federal Reserve Chair. “We will not compromise on these concerns, even when they force trade-offs with our economic interests.”

Previously, Yellen has called for the United States to undo some tariffs introduced under former President Donald Trump, in order to ease inflationary pressure on businesses and families.

This story is developing and will be updated.