When general Constantino Guveya Chiwenga, head of the Zimbabwe Defence Forces (ZDF), was on his way to China in early November, his vice president Emmerson Mnangagwa was being unceremoniously dismissed from the government and the ruling ZANU-PF party.

Chiwenga returned to Zimbabwe on Nov. 13 and issued a statement demanding president Robert Mugabe stop his purges of senior party officials. Mnangagwa has been a rival to the Mugabe’s wife as a successor to the aging leader. Two days later, the military announced that it had taken control of the government in a takeover it insisted was not a coup—even though reports and pictures say otherwise.

It’s unclear whether China, one of Zimbabwe’s largest trading partners, investors, and diplomatic allies, was privy to the ZDF’s plans. Asked about the visit in which Chiwenga met senior Chinese military officials, a spokesperson for China’s foreign ministry insisted it was “a normal military exchange.” On whether Chiwenga discussed details of the takeover with his Chinese counterparts, the spokesperson said he didn’t know the specifics.

What is clear, however, is that China will continue playing a major role in Zimbabwe. China is one of its largest trading partners, a major foreign investor, and a critical ally on the United Nations Security Council. On Thursday, China said that its “friendly policy” toward Zimbabwe would not change, regardless of what happens now. The military released a statement today that it is “currently engaging” with Mugabe, who has ruled Zimbabwe since its independence in 1980. Mnangagwa has reportedly returned to the country.

Reuters/Philimon Bulawayo Chinese president Xi Jinping with Zimbabwean President Robert Mugabe in Harare, Zimbabwe on December 1, 2015.

China and Zimbabwe need each other

Since the early 2000s, as Western countries sanctioned Zimbabwe over Mugabe’s controversial land reforms and repression of opposition forces, Harare has adopted what it calls a “Look East” policy. Before that, in 1989 when the Chinese military violently put down protests in Beijing, Mugabe defended China’s behavior, saying that any reforms made could “only take place on the basis of its own traditions and its own characteristics.”

Today, high level political exchanges are frequent. Chinese leader Xi Jinping visited Zimbabwe in 2015 and Mugabe visited China as recently as January. A Chinese company built Zimbabwe’s National Defence College with a loan secured from China. Zimbabwean military officials often attend trainings at the PLA National Defense University.

One of the hallmarks of China’s foreign policy in Africa has been Beijing’s pledges not to interfere in the domestic affairs of its partners. China has repeatedly blocked sanctions on Zimbabwe and Mugabe. Beijing tries to maintain neutrality in political rivalries, working with whatever government is in power.

But over time, China has had to stretch the limits of its self-avowed policy of non-interference in complicated political situations like in South Sudan. In Zimbabwe, China may run into similar complications.

Chinese companies have invested in car manufacturing, diamond mining, tobacco, and power stations. Earlier this year, a Chinese company pledged to invest $2 billion in the defunct steelmaker, the Zimbabwe Iron and Steel Company. According to researchers of China-Zimbabwe ties, Beijing has likely favored Mnangagwa (pdf, p.13) as a successor to Mugabe.

“A transition would benefit the Chinese in the sense that Mnangagwa is touted as a pragmatic and less ideological leader who could reform Zimbabwe’s economy to promote investment,” says Ronald Chipaike, a lecturer at Bindura University in Zimbabwe, who has researched relations between the two countries.

Whether or not Chiwenga told Beijing of the ZDF’s plans, he at least set the tone for an alliance with a new government in Harare. Speaking to Li Zuocheng of China’s Central Military Commission, believed to have close ties with Chinese leader Xi Jinping, Chiwenga congratulated Li on China’s recent 19th party congress, an event where Xi cemented his position as head of the Chinese Communist Party.

He told Li, according to China’s defense ministry, that Zimbabwe was willing to “deepen exchanges and cooperation in all fields with China to promote the rapid development of bilateral state and military relations.”