Two top trade advisers to President Trump had an expletive-packed shouting match during their trip to Beijing earlier this month, three people familiar with the exchange said, part of an ongoing turf war that is dividing the team negotiating new trade arrangements with China.

The fight erupted when senior White House adviser Peter Navarro complained to Treasury Secretary Steven Mnuchin about being excluded from key meetings with Chinese leaders, the three people said. The two argued about the team’s internal dynamic and whether it was functioning adequately.

They were in Beijing as part of an official visit, trying to deliver on Trump’s demand that China make dramatic changes in its trade policy.

Little progress was made during the meeting, though White House officials were hoping to make more progress during new talks this week.

The unresolved feud has contributed to the White House’s uneven approach to its trade negotiations with China in recent days, as White House officials have given different, at times contradictory descriptions about the discussions’ aims and what is and what isn’t up for debate. The discord could create a window for Chinese leaders to try to play advisers off each other during sensitive trade negotiations between the world’s two largest economies.

Mnuchin and Navarro are both close to Trump but have sharply different viewpoints on trade policy. Mnuchin, a former banker, has worked to establish a one-on-one rapport with China’s vice premier, Liu He. Liu is in Washington for meetings and is expected to meet with White House officials Thursday and Friday.

Navarro has much more strident views on China’s trade history, ones that Trump has often agreed with.

He traveled to Beijing with Mnuchin and several others earlier this month, but he was largely marginalized during the visit, said the three people familiar with the visit, who spoke on the condition of anonymity to discuss the internal dynamics. Navarro is participating in some of the meetings this week, but Mnuchin has established himself as the key negotiator.

Navarro is among a group of White House advisers who have fought for structural changes in Beijing that will ensure long-lasting adjustments in the trade imbalance between the United States and China. He co-authored a 2011 book titled “Death by China: Confronting the Dragon — a Global Call to Action,” which focused on his perceptions of China’s economic policies.

Earlier this year, when Trump made clear that he would stake out a tough position on trade policy, Navarro emerged as one of the White House’s most pivotal figures. But as the China discussions have intensified, Navarro and Mnuchin have been warring behind the scenes, with Mnuchin asserting himself as the key interlocutor and Navarro finding himself boxed out.

Versions of their disagreement were first reported Wednesday by Bloomberg and Axios.

Trump has called for a dramatic reduction in the gap between the amount of goods that China exports to the United States and the amount of goods the United States exports to China. (The gap is currently around $370 billion a year.)

But there have been signs China is seeking to add a number of unrelated measures to the trade talks, and Trump has shown a willingness to entertain them. For example, during the Beijing trip, Chinese officials pressed Mnuchin and others to relax restrictions on ZTE Corp., a Chinese telecommunications company that has violated U.S. law.

The Commerce Department in April imposed such severe restrictions on ZTE that the firm could have been forced to close, angering Chinese leaders. White House officials knew that China wanted restrictions to be loosened, but the fate of this company had not been part of the White House’s original negotiating platform. But with China pressing for relief, Trump agreed to help the company out, hoping it would ease trade talks.

This behind-the-scenes horse trading has occurred without input from Navarro or a number of other White House officials, and several appeared caught off guard during public appearances this week.

One person close to Navarro said the White House official believes he is the target of a leak campaign meant to further sideline him during the Liu visit, at perhaps the most pivotal moment in the trade talks between the United States and China.

The White House issued an initial list of people who would be participating in talks with Liu, and Navarro’s name was not on the list. But the status of these meetings remains in flux, one senior administration official said, and more names could be added, particularly if Trump intervenes.

Liu met Wednesday with lawmakers on Capitol Hill, many of whom do not support Trump’s vow to impose tariffs on China if it does not change its approach to trade.