Chinese President Xi Jinping has warned the United States that Beijing cannot give up even an inch of territory in the face of Washington’s belligerent military activities in the region.

“We cannot lose even one inch of the territory left behind by our ancestors. What is other people’s, we do not want at all,” Xi said while meeting visiting US Defense Secretary Jim Mattis on Wednesday.

Mattis and other US officials have repeatedly criticized China’s increasing military deployment in the disputed South China Sea region.

China and the US have also been at odds over trade policy. The US under President Donald Trump has imposed tariffs on Chinese imports, a move China has criticized as upsetting for global trade.

State television cited Xi as saying in the meeting with Mattis that China was not looking for “chaos” in the world, but said that on territorial issues there can be no concessions.

US Defense Secretary Jim Mattis and China's Defense Minister Wei Fenghe, left, inspect the guard of honor during a welcome ceremony at the Bayi Building in Beijing, China, June 27, 2018. (AFP photo)

Xi said China had peaceful intentions only, adding that the common interests of Beijing and Washington far outweighed their differences.

Tensions between the two countries intensified last month when China landed bombers on a disputed island and missiles on another in the South China Sea. The United States insists China has disproportionately increased its deployment in the region, which is also partially claimed by Brunei, Malaysia, the Philippines, Taiwan and Vietnam. China, which claims the entire South China Sea, views the US presence in the region as a provocation.

After meeting Xi, Mattis told reporters that he had “very, very” good talks with the Chinese president.

“I am happy to be in China and we are assigning the same high degree of importance to the military relationship,” Mattis said.

Mattis’ trip to Beijing came a day after the USS Ronald Reagan visited the Philippines. The US military said the presence of the aircraft carrier was meant to reassure Washington's allies that the US would have an enduring presence in the Pacific.