In an apparent first, Taiwanese President Tsai Ing-wen on Sunday visited a U.S. federal building in an official capacity — a move that China protested Monday amid Washington’s trade and security rows with Beijing and the United States’ closer ties with Taipei.

Tsai toured NASA’s Johnson Space Center in Houston, becoming the first sitting leader from the self-ruled island to set foot in an American government facility in the United States.

Tweets and pictures posted to the official account of the Taiwanese Foreign Ministry showed Tsai touring the iconic facilities and meeting NASA officials.

“#Houston, we’ve got a president! Couldn’t be more … proud. @iingwen is the 1st leader of #Taiwan to tour @NASA_Johnson during a #US stopover. Thanks @Astro_Ellen for helping realize this milestone moment. JW,” one tweet written by Foreign Minister Joseph Wu said.

The itinerary included the Mission Control Center and other facilities, Taiwan’s Central News Agency reported. Tsai stopped in Houston on the way home from a roughly weeklong tour of Central and South America.

The visit comes after U.S. President Donald Trump in March signed the Taiwan Travel Act, which allows high-level U.S. officials to visit Taiwan and vice versa — a break from previous policy that did not permit bilateral visits by Cabinet-level officials, but allowed Taiwanese presidents to transit through U.S. cities while en route to other countries.

Although the U.S. does not have formal diplomatic ties with Taiwan, it is its most powerful ally and top arms supplier. Beijing, for its part, has warned that it will defend — by force if necessary — its “One China” principle under which the self-ruling island is seen as part of China’s own territory, awaiting reunification.

On Monday in Beijing, Chinese Foreign Ministry spokesman Lu Kang was quoted as telling a daily briefing that China would “always oppose any country providing conveniences and venues for relevant people from Taiwan to conduct such activities.”

In wrapping up her visit, Tsai offered thanks on her official Twitter account for the U.S. hospitality.

“Great to visit #Houston again! A big thank you to everyone who came all the way to welcome my delegation & attend the #Taiwan expatriates banquet. This year’s event is the biggest we’ve ever hosted here. Your enthusiasm & support made me feel right at home!” she wrote.

As a courtesy to China, the U.S. has traditionally put a strict cap on media appearances by a Taiwanese president on American soil, but Washington has recently played up its ties with Taipei amid soaring tensions with Beijing over trade and its role in Asia.

Last Tuesday, the U.S. government denied any change to its separate “One China” policy after Tsai delivered a political speech in the United States — the first time in 15 years that a Taiwanese leader has done so.

Beijing said that it had lodged an official protest with the United States over the Aug. 13 speech in Los Angeles, where she said Taiwan’s freedom and future were not negotiable.

China’s hostility toward Taiwan has grown since Tsai, a member of the island’s pro-independence Democratic Progressive Party, was elected in 2016.

Beijing suspects Tsai wants to push for formal independence, which would cross a red line for Communist Party leaders in China, although Tsai has said she wants to maintain the status quo and is committed to ensuring peace.

As cross-strait relations have deteriorated, China has also ramped up its military presence near the island, conducting large-scale exercises in the area.

Last month, the Chinese People’s Liberation Army conducted a live-fire drill in the East China Sea in an area “similar in size to the island of Taiwan.” In a report headlined “PLA drill in East China Sea ‘tailored for Taiwan separatists,’ ” Chinese state-run media alluded to the exercise as being a message to Taipei, calling it a “joint operation with high complexity” designed “to simulate real combat.”

China also sailed its sole operating aircraft carrier through the Taiwan Strait in January and March and held so-called encirclement exercises nearby in recent months.

The heightened tensions even saw the U.S. Navy dispatch two warships through the strait earlier this month for the first time in about a year.

Beijing has also managed to deplete Taipei’s diplomatic allies, luring away four since Tsai came to power and leaving it with only 18 countries worldwide that recognize it over China.

Chinese anger over Taiwan has grown since Trump inked the Taiwan Travel Act and the government green-lighted a license required to sell cutting-edge submarine technology to Taipei.

The State Department in Washington has also reportedly requested the deployment of a detachment of marines to help safeguard new facilities of the American Institute in Taiwan, Washington’s de facto consulate in lieu of formal diplomatic ties, in Taipei.

U.S. Marines usually guard missions in countries with which Washington has formal diplomatic ties.

Derek Grossman, a senior defense analyst at the RAND Corp., said the decision to let Tsai visit the NASA sites was certain to infuriate the Communist Party leadership in China.

“Beijing will believe that the Trump administration is consciously elevating the status of U.S.-Taiwan relations by allowing her to visit a U.S. federal government facility,” Grossman said.

“Even though NASA is not the Pentagon, the State Department or the White House, it is still a clear sign that the U.S. is increasingly comfortable enabling government-to-government contacts with Taiwan, which Beijing has resisted at all costs and believes, if it comes to fruition, is a slippery slope to diplomatic recognition of Taipei,” he said.

“I believe this would be a red line for Beijing and provide the best chance for Chinese military action against the island,” Grossman added.