Chinese President Xi Jinping affirmed his country's commitment to world peace but won't surrender even an inch of its territory -- including the South China Sea. Xi made these assertive remarks to U.S. Defense Secretary Jim Mattis, who is in Beijing on an official visit.

Xi also told Mattis that China had only peaceful intentions and won't "cause chaos." He also noted that the common interests of China and the U.S. far outweigh their differences. There can be no concession on territorial issues, however.

"Our stance is steadfast and clear-cut when it comes to China's sovereignty and territorial integrity. 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," declared Xi. Mattis did not confront Xi's provocative remarks head-on but went for the polite diplomatic route.

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

The U.S. defense secretary also got the same message, but in more polite terms, from Chinese Minister of Defense Wei Fenghe whom he later met.

"China and the United States can only develop together if we maintain no conflict, no confrontation, mutual respect and win-win cooperation," said Wei. "China and the United States' two militaries must implement the consensus of the two countries' leaders, increase mutual trust, strengthen cooperation and manage risks to turn ties between the two militaries into a factor for stability in the bilateral relationship."

 Wei said Mattis' visit to China is "a new positive factor to the military-to-military and state-to-state relationship."

Mattis, however, comes to China weighed down by baggage related to his hard line against Beijing. In May, he reassured the United States' Asian allies his country will continue to stand against China's militarization of illegal man-made islands in the South China Sea.

Mattis noted that China hasn't kept a promise it made to former president Barack Obama to not emplace weapons on the Spratly Islands also claimed by Malaysia, the Philippines, Taiwan, and Vietnam. Mattis said China's neighbors are against China's weaponization of the Spratlys. These Asian nations also want to see continued freedom of navigation in the South China Sea.

"If you notice, there's only one country that seems to take active steps to rebuff them or state their resentment of them," said Mattis, referring to China.

He also said U.S. Navy warships continue to maintain a "steady drumbeat" of naval operations -- called Freedom of Navigations Operations (FONOPS) -- around disputed islands. He noted that "only one country" (China) seems to be bothered by the routine patrols being conducted by the U.S. Navy.

"We are going out of our way to cooperate with Pacific nations, that's the way we do business in the world," said Mattis. "But we are also going to confront what we believe is out of step with international law, out of step with international tribunals that have spoken on the issue."

The United States has long been against China's claims to own the South China Sea based on dubious "historical rights" claims. On May 25, two Navy warships -- the Arleigh Burke-class guided-missile destroyer USS Higgins (DDG-76) and the Ticonderoga-class guided-missile cruiser USS Antietam (CG-54) -- sailed close to 12 nautical miles of several Chinese-controlled islands in the Paracels, which China seized from Vietnam.