Beijing (CNN) China will not give up "any inch of territory" in the Pacific Ocean, President Xi Jinping told US Defense Secretary James Mattis Wednesday during a visit to Beijing.

"Our stance is steadfast and clear-cut when it comes to China's sovereignty and territorial integrity," Xi said, according to state media , adding that "any inch of territory passed down from ancestors can not be lost while we want nothing from others."

Mattis' meeting with Xi inside the Great Hall of the People comes as relations between Washington and Beijing have been marred recently by rising tensions -- not only by an impending trade war but also by both militaries viewing each other with increasing suspicion and alarm

He is the first Pentagon chief to visit China since 2014, and also held meetings with his Chinese counterpart Wei Fenghe and other top generals.

Before departing Sunday on his trip to Asia, Mattis said he hoped to establish a "transparent strategic dialogue" with his Chinese interlocutors.

"Going forward, we obviously look at the actions of China, but I am going there to do a lot of listening and identification of common ground and uncommon ground on the strategic level at this time," said Mattis.

"I did not want to immediately go in with a certain preset expectation of what they are going to say," he added. "I want to go in and do a lot of listening. I will be very clear about what we see developing, but that's the whole reason I am making the trip instead of just sitting in Washington reading news reports, intelligence reports or analyst reports."

Xi told the US defense chief that despite disagreements in the Pacific over the South China Sea, "it has long been known that the real experts on military affairs do not want to employ military means to solve issues."

US Defence Secretary Jim Mattis and China's Defence Minister Wei Fenghe inspect and honour guard during a welcome ceremony at the Bayi Building in Beijing on June 27, 2018.

Areas of convergence

Mattis, a former Marine general, angered the Chinese government recently when he stressed the US military's intention to continue " a steady drumbeat " of naval exercises to challenge China's territorial claims in the South China Sea, where Beijing is locked in a bitter dispute with several smaller neighbors

The Pentagon last month disinvited China from participating in an annual multinational military drill, known as RimPac, which officially kicks off this week, blaming it on Beijing's escalating militarization in the South China Sea by deploying new missile systems on its man-made islands in the contested waters.

A US military official recently said that suspected Chinese laser attacks have been targeting US warplanes in the Pacific, with 20 incidents recorded since September of last year -- an allegation that Beijing rejected as "pure fabrication."

Another contentious point involves Taiwan , a self-governed island off China's southeastern coast that Beijing regards as part of its territory. Despite condemnations from China, the US continues to sell advanced weapons to the island under the Taiwan Relations Act.

In the past few months, the Trump administration angered Beijing by authorizing US manufacturers to sell submarine technology to Taiwan, as well as enacting the Taiwan Travel Act to encourage official visits -- including by senior military officers -- between the US and the island.

Addressing Mattis' trip in light of ongoing tensions in the region during a press briefing Wednesday, Chinese Foreign Ministry spokesman Lu Kang said it was "natural that China and the US have differences in different times and aspects as two big countries."

"The key part is solving the issues between the US and China with mutual respect. We have always believed that the bilateral relationship can benefit both countries and both peoples," he added.

JUST WATCHED Over sixty years of US air power in one formation Replay More Videos ... MUST WATCH Over sixty years of US air power in one formation 01:37

Asia trip

Following his Beijing visit, Mattis will travel to Seoul, where he will meet with South Korean Defense Minister Song Young-moo.

Mattis said discussions will focus on the "way ahead" with the goal of North Korean denuclearization and other issues of cooperation between US and South Korean militaries, following the the US suspension of military exercises after the Singapore summit.

He will also meet with his Japanese counterpart in Tokyo, where the conversation will include Japanese concerns of the threat posed by North Korean short- and medium-range missiles and other issues of regional concern.