KABUL, July 1 (Xinhua)Afghan security forces resumed offensive against the Taliban on Saturday after President Ashraf Ghani declared an end to an unilateral government ceasefire.

Ghani said the ceasefire, which lasted 18 days after it was extended once and overlapped with the Taliban's unilateral three-day truce for Eid, had been "98 percent successful."

"The ceasefire is over. The Afghan security and defence forces are allowed to restart their military operations," Ghani told reporters.

The unprecedented ceasefire

The three days of no fighting were unprecedented in the nearly 17-year conflict and triggered jubilant scenes across the war-weary country.

Taliban fighters and security forces spontaneously celebrated the holiday that caps the holy month of Ramadan, hugging each other and taking selfies.

The militants were also mobbed by relieved civilians, who have borne the brunt of the war, raising hopes of a renewed push for peace talks.

Ghani said the ceasefire had shown that the majority of the insurgents wanted peace and it was the "Taliban's turn to give a positive response."

"I am ready to extend the ceasefire anytime when the Taliban is ready," he said at a press conference.

Violence continues

The insurgents returned to the battlefield last week after refusing a government request to extend their ceasefire, launching attacks across the country that have seen scores killed or injured.

Also on Saturday, two Afghan security personnel lost their lives after Taliban militants stormed a security checkpoint in Aikhanum area of the northern Takhar province, provincial police spokesman Abdul Khalil Asir said.

The official also noted that the insurgents captured four more security personnel.

However, Asir said that four insurgents had been killed in fire exchange forcing the militants to flee.

Taliban militants haven't commented yet.