The U.S. military must be prepared to respond to a potential invasion of Taiwan as early as this year, said Admiral Michael Gilday, commander of U.S. naval operations.

His comments came after a senior Taiwanese security official warned that any attempted invasion of the island would fail and turn China into an international pariah.

In a discussion with the think tank, Gildea was asked about Chinese leader Xi Jinping's recent speech and whether he agreed with another U.S. admiral's comments that Beijing would be ready to invade Taiwan by 2027, AFP reported.

"It's not just what President Xi says, it's how the Chinese behave and what they do," Gilday said.  "And what we've seen over the past 20 years is that they have delivered on every promise they've made earlier than they said they were going to deliver on it." "So when we talk about the 2027 window in my mind, that has to be a 2022 window or potentially a 2023 window," he added. "I can't rule that out. I don't mean at all to be alarmist by saying that. It's just that we can't wish that away."

The rhetoric and actions toward Taiwan have become more prominent under Xi, China's most assertive leader in his generation, and the military has increased its purchases of equipment to make the invasion.

On Monday, U.S. Secretary of State Antony Blinken warned that Beijing wants to take over Taiwan in a much shorter time frame than previously thought, adding that under Xi Jinping an entirely different China has emerged. Blinken also warned that any war over Taiwan would have a huge impact on world trade.