(CNN) US Secretary of Defense James Mattis has pulled out of a planned visit to Beijing in October, a US official tells CNN, the latest sign of deteriorating ties between the United States and China.

Mattis had originally planned to visit the Chinese capital to meet with senior Chinese officials to discuss security issues. The last-minute cancellation has not been publicly confirmed by the Pentagon.

The decision to pull out of the trip comes amid growing tensions between Washington and Beijing across multiple fronts, from the Trump administration's tariffs on Chinese goods to new sanctions announced against the Chinese military.

At a press conference on Wednesday, US President Donald Trump said his often-mentioned friendship with Chinese leader Xi Jinping may have come to an end.

"He may not be a friend of mine anymore. But I think he probably respects me," Trump said.