China on Wednesday said it respected Robert Mugabe’s decision to step down as president of Zimbabwe and vowed to continue “friendly” relations with the country it backed during his authoritarian rule.

China became a major political and economic partner of Mugabe’s regime over the years as the West shunned the veteran leader over his government’s human rights violations.

But the Asian power has avoided taking sides since the military took over and placed Mugabe under house arrest last week.

Chinese foreign ministry spokesman Lu Kang praised Mugabe, 93, for his “historic contributions” to Zimbabwe’s independence and his commitment to the friendship between the two countries.

“China respects Mr. Mugabe’s decision to resign, and he is still a good friend of the Chinese people,” Lu Kang told a regular news briefing.

The spokesman also said China was ready to work with those in power in Zimbabwe.

“Our friendly policy towards Zimbabwe will not change. We want to continue to follow the principles of equality, mutual benefits, and win-win cooperation,” Lu said.

Mugabe resigned on Tuesday, swept from power as his 37 years of authoritarian rule crumbled within days of a military takeover.

Zimbabwe, meanwhile, awaited to see who would replace him.

Former vice president Emmerson Mnangagwa, whose sacking earlier this month led to Mugabe’s downfall, was expected to return home on Wednesday, his aide said.

Mugabe adopted a “look east” policy and Chinese President Xi Jinping was one of the rare foreign heads of state to visit Harare when he made a stop there in 2015.

When Mugabe visited Beijing in 2014, Xi lionised him as an “old friend” of the Chinese people.

Mnangagwa also has historical ties with China, having undergone military training in the Asian country before joining Zimbabwe’s struggle for independence from Britain.

And Army chief General Constantino Chiwenga, a key figure in forcing Mugabe out, happened to be on an official visit in China when Mnangagwa was ousted by Mugabe.

“China respects the choice made by Zimbabwe’s people and we consistently and strongly adhere to the principle of not interfering in other countries’ domestic affairs,” Lu said.

Zimbabwe’s relations with China and the Chinese Communist Party date back to the liberation struggle of the 1970s, when Beijing provided arms and trained some of the top guerrilla leaders.

China has invested heavily across Africa and Zimbabwe has benefited from its ties with Beijing.

Zimbabwe was China’s largest foreign supplier of tobacco, with some 40 percent of the tobacco imported by the Asian country coming from the African nation.

China set up a joint venture with Zimbabwe in a diamond mining company, but Mugabe announced the nationalisation of the nation’s diamond mines last year. The Asian country imported $2.5 million worth of diamonds from Zimbabwe last year.

Chinese companies have also been involved in projects to install a cellular phone network, expand a hydropower station and build a coal-fired power plant.