Beijing: With tensions simmering in the Taiwan strait, Chinese President Xi Jinping is facing a mammoth challenge as his response to the situation is not just about catering to Chinese nationalist sentiments ahead of his third term in office but also managing the economic costs and diplomatic fallout with the US, media reports said.

Xi continues to struggle in figuring out a way to deal with the recent US House Speaker Nancy Pelosi's visit to Taiwan which has riled up China. This is a politically sensitive time for Xi as he faces a 20th party congress which is fast approaching. He wants to show the Chinese people that China remains undeterred in its resolve to deal with the tensions in the Taiwan strait.

China's show of its military muscle will have repercussions and Xi must ensure that he is able to tackle them in an effective manner without damaging the Chinese economy, reported Al Jazeera. Chinese economy is already showing negative trends and amidst this every step that Xi takes will have to be measured with caution.

Stephen Nagy, a Tokyo-based China analyst and senior fellow at Canada's MacDonald-Laurier Institute while speaking to Al Jazeera said, "It's put him (Xi) in an impossible position."

"He has to maintain economic growth, which would be severely hampered by any kinetic response to the US and the increasing international recognition of Taiwan as a political entity," Nagy said.

"Yet he is under tremendous pressure from nationalist forces inside China, who expect a strong response to what they understand to be a clear violation of the 'One China Policy'... I'm doubtful he can strike this balance."

After US House Speaker Nancy Pelosi's visit to Taiwan, China conducted live-fire exercises and staged its largest-ever military exercises in waters around Taiwan.

Conducting military exercises was not the only action the Chinese authorities have taken, in order to cripple Taiwan of its economy, they are adopting to cold war tactics. They have banned imports of over 2,000 Taiwanese food products and halted sand exports to Taiwan. In addition this week Taiwan's government websites were hit by overseas cyberattacks.

"It's not finished yet," said Nagy. "I expect more provocative military activity from China in the coming months ... we can also expect more cyberattacks, restrictions on Taiwanese businesses operating in China, and even secondary sanctions to increase the pressure on Taiwan's friends."

Over Pelosi's visit, Chinese state media also took over social media platforms and ran nationalistic hashtags about "reunification" of China with Taiwan.

These posts have generated several billion views on the microblogging platform Weibo. "This was a truly international event and something that was very much developing in real-time," Manya Koetse, a veteran analyst of Chinese social media and editor-in-chief of WhatsonWeibo, told Al Jazeera.