Following a surge in violence in Afghanistan, Ashraf Ghani calls for a three-month truce with the Taliban.

Afghan President Mohammad Ashraf Ghani has declared a conditional ceasefire with the Taliban ahead of Eid al-Adha, effective from Monday.

In a televised address on Sunday, Ghani said the truce would be "until the prophet's birthday provided that the Taliban reciprocate", referring to the Prophet Muhammad's birthday which is celebrated on November 21 in Afghanistan.

Ghani, who was speaking during a ceremony to mark the 99th Independence Day of Afghanistan at the iconic Darul Aman palace in the capital, Kabul, said the decision was reached after extensive consultation with different segments of the Afghan society and Islamic scholars worldwide.

The Taliban did not respond to requests for comment immediately but released a statement saying that they planned to free "hundreds of prisoners" on the occasion of Eid.

Ghani's ceasefire announcement was limited to the Taliban and excluded other armed groups such as the Islamic State of Iraq and the Levant (ISIL, also known as ISIS).

It was immediately welcomed in neighbouring Pakistan.

"Pakistan fully supports all such efforts that contribute to achieving durable stability and lasting peace in Afghanistan, a spokesperson for Pakistan's ministry of foreign affairs said in a statement.

"The people of Afghanistan deserve it. Coinciding with the Independence Day of Afghanistan, the announcement has an even greater significance."

Record number of civilians killed

The Afghan government had previously announced a ceasefire with the Taliban during the Eid al-Fitr holiday in June.

That truce, the first formal, nationwide ceasefire since the 2001 US invasion. was indirectly accepted by the Taliban for three days, but the group later rejected a call by the president to extend it, with attacks resuming shortly after.

Ghani's announcement follows a bloody week of fighting across Afghanistan which saw the Taliban launch a massive assault against the provincial capital Ghazni - just a two-hour drive from Kabul.

At least 150 soldiers and 95 civilians were killed in a five-day siege, which eased last week when Afghan soldiers backed by US forces pushed back the group's heavily armed fighters.

Blasts, suicide attacks and clashes between the Taliban and Afghan forces killed over 1,600 civilians in the first six months of the year, the highest number in the past decade, despite June's truce, the United Nations said in a statement on Sunday.

Published by the UN Assistance Mission in Afghanistan, the report attributed 42 percent of civilian casualties to the Afghan Taliban and 18 percent to the ISIL, noting a fourfold increase in deaths and injuries caused by both the armed groups.

Afghan security forces have struggled to battle the Taliban and ISIL since the US and NATO formally concluded their combat mission in the country in 2014 and shifted their focus to a "support and counterterrorism" role.

Meanwhile, pro-government forces, including Afghan national security troops and international military forces, caused a fifth of the civilian casualties so far this year.