The armed group said on Saturday that the ceasefire would exclude foreign forces, and that it would defend itself against any attack.

Afghanistan is expected to celebrate Eid on June 15-17, depending on the lunar calendar.

Security Council members further urged the Taliban to accept Kabul's February offer of direct talks "without any preconditions and without the threat of violence" aimed at ending the conflict.

"The members of the Security Council reiterated the importance of an inclusive Afghan-led and -owned peace process for the long-term prosperity and stability of Afghanistan and expressed their full support for the Afghan government's efforts to that end," council members said in a statement.

The surprise move by the government came days after a gathering of the country's top religious leaders in the capital, Kabul, issued a fatwa - a religious edict issued by an expert in Islamic law - against suicide bombings and attacks.

The religious gathering was attacked by a suicide bomber, killing at least seven people.

Increase in violence

The Taliban had denounced the gathering, insisting its fight against what it considers foreign invaders was justified. It instead urged the religious scholars to side with it against the "occupation" of the country.

In February, Ghani offered recognition of the Taliban as a legitimate political group in a proposed political process that he said could lead to talks to end more than 16 years of war.

Ghani proposed a ceasefire and a release of prisoners among a range of options, including new elections involving the armed group, and a constitutional review in a pact with the Taliban to end a conflict that last year alone killed or wounded more than 10,000 Afghan civilians.

The Taliban has been fighting against Kabul since it was removed from power in 2001 by the US-led forces. The armed group has set the withdrawal of foreign forces as a pre-condition for peace talks.

The US and NATO formally concluded their combat mission in Afghanistan in 2014, but the US still has thousands of forces based there in a support and counterterrorism role.

The Donald Trump administration has sent additional troops to try to change the course of the US's longest war but it has failed to check deadly violence. Hundreds of people have been killed since the beggining of the year in attacks claimed by the Taliban and the Islamic State of Iraq and the Levant (ISIL, also known as ISIS).