China and Iran have urged mutual neighbor Afghanistan to end restrictions on women’s work and education.

The call came in a joint statement Thursday issued at the close of a visit to Beijing by Iranian President Ebrahim Raisi during which the two sides affirmed close economic and political ties and their rejection of Western standards of human rights and democracy.

Since taking over Afghanistan in August 2021, the Taliban has banned women and girls from universities and schools after the sixth grade and forced out those in elected offices and other prominent positions.

CHINA THREATENS ‘COUNTERMEASURES’ AGAINST US ENTITIES AFTER SPYCRAFT SHOOTDOWN

"The two sides ... called on the Afghan rulers to form an inclusive government in which all ethnic groups and political groups actually participate, and cancel all discriminatory measures against women, ethnic minorities and other religions," the statement said, adding that the U.S. and its NATO allies "should be responsible for the current situation in Afghanistan."

The U.S. had backed Afghanistan's elected government against the Taliban, but withdrew amid the rising costs and dwindling domestic support for a government that was unable to counter a Taliban revival.

The call for women's rights is notable coming from Iran’s hardline Shiite Muslim regime, which has been challenged by months of protests sparked by the death of a young woman in police custody for allegedly violating clothing requirements.

Ebrahim Raisi, Xi Jinping

Visiting Iranian President Ebrahim Raisi, right, walks with Chinese President Xi Jinping during a welcome ceremony in Beijing, on Feb. 14, 2023.  (Yan Yan/Xinhua via AP, File)

The country’s theocracy has executed at least four men since the demonstrations began in September over the death of Mahsa Amini. All have faced internationally criticized, rapid, closed-door trials.

The bulk of the China-Iran joint statement emphasized strong political and economic ties, the quest for peace and justice in the Middle East and denuclearization in spite of Tehran's alleged drive to produce atomic weapons.

In a meeting earlier with Chinese leader Xi Jinping, Raisi expressed support for China's crackdown on democracy in Hong Kong and claim to self-ruling democratic Taiwan.

CHINA IS WINNING THE RUSSIA-UKRAINE WAR AMID MASSIVE US, RUSSIA WAR EXPENDITURES

China and Iran portray themselves, alongside Moscow, as counterweights to American power, and have given tacit, and in Iran's case, material support to Russia's invasion of Ukraine.

"China supports Iran in safeguarding national sovereignty" and "resisting unilateralism and bullying," Xi said in a statement carried by Chinese state TV on its website.

CLICK HERE TO GET THE FOX NEWS APP

Xi and Raisi attended the signing of 20 cooperation agreements including on trade and tourism, the Chinese government announced. Those add to a 25-year strategy agreement signed in 2021 to cooperate in developing oil, industry and other fields.

China is one of the biggest buyers of Iranian oil and a major source of investment.

Iran has struggled for years under trade and financial sanctions imposed by Washington and other Western governments. The U.S. government cut off Iran’s access to the network that connects global banks in 2018.