After weeks of back and forth, Nancy Pelosi has ignored Chinese threats and visited Taiwan.

House Speaker Nancy Pelosi, D-Calif., who is leading an official congressional delegation to Asia this week, made an unannounced visit to Taiwan on Tuesday.

The visit to Taiwan comes despite harsh warnings from the Chinese government. “If Pelosi insists on visiting Taiwan, China will take resolute and strong measures to defend its sovereignty and territorial integrity,” Chinese Foreign Ministry spokesperson Zhao Lijian said Monday.

Pelosi had invited a small group of lawmakers to join her on the trip, which they are making as the House enters its monthlong August recess.

The controversial trip comes amid growing concern in Washington as U.S.-China relations strain over the future of the self-ruling democracy that Beijing claims as its territory, in addition to an economic slowdown and Russia’s invasion of Ukraine.

Chinese officials and state media have been responding in recent days to news of the potential visit by warning that China is prepared to “take countermeasures,” over what it sees as foreign interference in the Taiwan issue, a Chinese Foreign Ministry spokesman said.

“Those who play with fire will perish by it,” the Chinese government said in a statement following Biden’s call with Xi on Thursday. “It is hoped that the U.S. will be clear-eyed about this.”

Biden, who spoke to Chinese President Xi Jinping last week, said last month that U.S. military officials thought it was “not a good idea” for Pelosi to visit Taiwan. But the White House has since backed off those warnings as her trip approached.

On Monday, National Security Council spokesman John Kirby said Pelosi’s potential visit was “consistent with long-standing U.S. policy” and China not to turn into “some sort of crisis or use it as a pretext to increase aggressive military activity in or around the Taiwan Strait.”

During an interview with ABC’s “Good Morning America” on Tuesday, National Security Adviser Jake Sullivan said that “if China chooses to try to turn a potential visit by the speaker into a crisis or tries to use it as a pretext to take aggressive action around Taiwan, that’s on them.”

“The United States is not looking for escalation but, of course, we will reserve the right to ensure that we are defending our interests and we will stay vigilant to whatever China chooses to do in the coming hours and days,” he added.

Pelosi is the highest-ranking U.S. official to visit Taiwan since then-House Speaker Newt Gingrich traveled there in 1997. Lawmakers from both sides of the aisle (and Gingrich) had been urging Pelosi to make the trip despite Biden’s initial warning.

The five House Democratic lawmakers traveling with Pelosi were Foreign Affairs Committee Chairman Gregory Meeks, D-N.Y.; Veterans Affairs Committee Chairman Mark Takano, D-Calif., who led his own delegation to Taiwan last year; Rep. Suzan DelBene, D-Wash., a leading voice on trade issues; Rep. Raja Krishnamoorthi, D-Ill., a member of the Intelligence Committee; and Rep. Andy Kim, D-N.J., a former national security official in the Obama administration.

For days, Pelosi’s office had declined to confirm any plans for international travel, citing security protocols. The White House also had not confirmed the trip.