As the leaders of the G7 countries are set to meet on Tuesday to discuss the Afghan crisis and possible economic sanctions against the Taliban, China expressed reservations over imposing penalties, saying the US and its allies should learn lessons from the past and act prudently.

The Group of Seven leaders from Canada, France, Germany, Italy, Japan and the United States are due to hold a virtual meeting on Tuesday to discuss the situation arising after Taliban's takeover of Afghanistan and coordinate international response to the crisis.

Ahead of the meeting, British Prime Minister Boris Johnson, who will chair the emergency G7 virtual meet to coordinate international response to the Afghan crisis, said the Taliban will be judged by its deeds rather than words.

The Taliban seized power in Afghanistan on August 15, two weeks before the US was set to complete its troop withdrawal after a costly two-decade war.

Downing Street said on Monday that during the meeting on Tuesday, Johnson will call on G7 leaders to continue to stand by the Afghan people and step up support for refugees and humanitarian aid.

He is expected to urge international partners to match the UK's commitments on aid and the resettlement of those most in need in order to protect human rights and contribute to the stability of the region.

Asked for his reaction on G7 leaders' plan to impose new sanctions on the Taliban, Chinese Foreign Ministry spokesman Wang Wenbin told a media briefing here that imposing sanctions and applying pressure will not solve problems.

“Afghanistan is an independent sovereign state. The US and its allies should learn lessons from the past and do some soul searching and act prudently on Afghanistan related issues," he said.

“Any wanton sanctions and pressuring will not solve the problem. We believe that while advancing the peace and reconstruction and transition in Afghanistan, the international community should think about how to prevent military intervention under the pretext of democracy," he said.

“We should not allow the repeat of a tragedy where a certain country made mistakes but the Afghan people and the international community and especially regional countries paid the price," he said, in an apparent reference to the US intervention in Afghanistan 20 years back and its hasty withdrawal of troops.

On Monday, Wang hinted at China stepping up financial assistance to Taliban-controlled Afghanistan, saying it will play a “positive role” in helping the war-ravaged country amid global pushback to stop funding to Kabul until the Afghan militant group modified its hardline religious policies.

Asked for his reaction to comments by Afghanistan's exiled central bank chief stating that Taliban may go to China and Pakistan to replace the US for financial assistance, Wang while criticising the US actions in Afghanistan said, “China always pursues a friendly policy toward the entire Afghan people”.

“For a long time, China has provided much assistance in economic and social development in Afghanistan. China stands ready to continue to play an active role in promoting peace and reconstruction in Afghanistan, and helping the nation to enhance the ability to achieve self-development and improve people's livelihood," he said.