After China canceled a high-level meeting for Defense Secretary Jim Mattis in Beijing in October, prompting the Pentagon to cancel the trip altogether, it appeared that tensions between the two countries had taken a turn for the worse, and that economic tensions were bleeding into the military sphere.

However, several weeks after the Chinese canceled the meeting, Beijing sent a general to the Pentagon, Maj. Gen. Huang Xueping, to smooth over tensions and make sure that a visit by the Chinese defense minister to the Pentagon in November would still happen, a senior defense official told Breitbart News last Thursday.

On Friday, Chinese Defense Minister Gen. Wei Fenghe indeed came to Washington, first participating in the second Diplomatic and Security Dialogue at the State Department with Mattis, Secretary of State Mike Pompeo and Chinese Foreign Minister Yang Jiechi, before heading directly over to the Pentagon for the meeting with Mattis.

Mattis greeted him on the steps of the Pentagon with the big smile he normally greets visitors with, despite having stood in the rain for a few minutes until the Chinese delegation arrived. There was an honor cordon ceremony, a continuation of past Chinese defense minister visits to the Pentagon under previous administrations.

One would not have guessed from that interaction that the U.S. and China were in the midst of an intense trade war, nor that the defense relationship was being threatened as well. And the Chinese intend to keep the U.S.-China military relationship that way.

U.S. defense officials tell Breitbart News that as U.S.-China economic relations flounder, China has grasped onto the defense relationship with the U.S. in hopes of making the relationship a source of stability with Washington.

“The Chinese have been nervous,” the senior defense official said. “They are under a lot of pressure right now.”

Bonnie Glaser, senior adviser for Asia and the director of the China Power Project at Center for Strategic and International Studies, said that China recognizes a “full-blown strategic competition with the United States is very bad for China.”

“They are looking for opportunities to stabilize the relationship…which is why they had pushed very hard for the four new dialogue mechanisms that were created at Mar-a-Lago. They all had one round, and they were all basically suspended…so the Chinese were really eager to get the Diplomatic and Security Dialogue on track.”

Glaser said part of China trying to shore up its relationship with the Pentagon was also domestic.

“If Xi Jinping is seen as not managing the U.S.-China relationship well, then I think that he becomes a target of criticism domestically. He is certainly being criticized for not handling the trade relationship well, and so I think he doesn’t want to be criticized as also not handling the security side of the relationship well,” she added.

The military-to-military relationship is typically the first thing to go when relations between two countries sour. It happened between the U.S. and Russia in the wake of Russia’s invasion of Ukraine in 2014. It last happened between the U.S. and China, for two years after the U.S. signed a $6 billion arms deal with Taiwan in 2010.

There have been no shortage of tense moments between the U.S. and Chinese military in recent months.

In September, the U.S. sanctioned the Chinese Defense Ministry under the Countering America’s Adversaries Through Sanctions Act (CAATSA) for purchasing Russian military equipment. In response, China recalled the commander of its navy from the U.S., where he was planning to meet with the U.S. Navy’s top commander, and rejected a U.S. Navy request for a port visit in Hong Kong.

Then, the U.S. angered China by flying U.S. bombers through the East and South China Seas. A Chinese warship then came within 45 yards of the U.S. destroyer USS Decatur while it was sailing through the South China Sea. Sometime amidst these events, China canceled Mattis’ meeting with a high-ranking Chinese military official in Beijing, prompting Mattis to cancel his trip altogether.

Despite the tit-for-tat, China lobbied hard to get the military relationship on track.

The military-to-military relationship “is very important to them,” the senior defense official said.

Experts and officials say they do not expect China to change its behavior on the security front, but China’s desire for a stable military relationship could mean the Pentagon can press Beijing harder to establish a way to deconflict — or avoid mishaps — when U.S. ships are operating in the contested regions.

“Maybe there is more space to have a dialogue on how we deconflict operations in the South China Sea. Maybe there is a potential for getting the Chinese to agree more on how we implement these agreed-upon rules of the road because we already have them so that we avoid accidents,” Glaser said.

“But even that is uncertain…because I do think Xi Jinping is under pressure to show that he can defense Chinese sovereignty but is not going to look soft on the United States,” she said.

Under the Trump administration, the Pentagon has sought to make challenging China’s excessive maritime claims a regular and less contentious occurrence.

One of Mattis’ earliest actions on the job was to approve a plan to regularly challenge those claims in the South China Sea. Breitbart News first reported that Mattis had drawn up a plan to have U.S. Navy war ships sail by contested islands in the South China Sea on a regular basis to contest China’s territorial claims, called Freedom of Navigation operations (FONOPs).

According to Reuters, there have been six FONOPs in the South China Sea between September 30, 2017, through September 30, 2018 — the equivalent to what occurred under the last two years of the Obama administration.

In another change, the Pentagon has also begun publicizing the transit of U.S. warships through the Taiwan Strait, as Breitbart News also first reported. This year, the U.S. confirmed sending two warships through the strait, the first time it has confirmed doing so since the Bush administration sent an aircraft carrier through in 2007.

The Trump administration has also sought to regularize arms sales to Taiwan, by approving smaller and more frequent sales, versus bundling them in larger and less frequent packages. Also in September, the State Department approved an arms sale of $330 million to Taiwan.

Perhaps most significantly, the Pentagon identified China as a great power competitor in its National Defense Strategy, which is guiding the decision-making on everything from budgets to training.

The Chinese have reacted angrily to these challenges. At the State Department on Friday, the Chinese foreign minister said he “made it clear” to the U.S. that it should stop sending ships and aircraft close to “Chinese Islands” in the South China Sea.

But the Pentagon has no intentions of relenting. Trump administration officials have tried to make it clear to the Chinese that “competition does not mean conflict.”

Later, in his meeting with Wei at the Pentagon, Mattis reiterated the U.S.’s position.

“Both agreed that the military relationship could be a stabilizing factor in the overall bilateral relationship,” a Pentagon readout of their meeting said.

“Secretary Mattis also raised the importance of all maritime forces conducting their operations in a safe and professional manner in accordance with international standards and norms. The Secretary and the Minister agreed to continue progress on a crisis communications and deconfliction framework to reduce risk.”