Afghan Muslims were celebrating their first peaceful Eid since 2001. [AFP]

Afghans greeted the beginning of Eid with prayers on Friday as the Muslim holiday dawned in peace for the first time since the 2001 US-led invasion, after the Taliban agreed to an unprecedented ceasefire.

Flocking to mosques for special morning worship marking the first day of the festival, youngsters in the war-battered country expressed cautious optimism, following the suspension of fighting between Afghan security forces and the militants.

Afghan Muslim men offer prayers at the start of Eid al-Fitr in Herat. [AFP]

"On almost every Eid we have had attacks -- this is a rare Eid without violence," Samiullah, 17, who is almost the same age as the conflict, told AFP after prayers at the Shah-e Do Shamshira mosque in central Kabul.

"We are hopeful peace will come to Afghanistan."

Fourteen-year-old Sohrab Ahmad, who earns money polishing shoes outside the mosque, said he could not remember an Eid without fighting.

Muslim women wait for the Eid-Gah, the prayer on the morning of Eid Al-Fitr at the Rasooli Masjid in Pretoria, South Africa. [AFP]

 "I believe there will be peace between the Taliban and the Afghan government," he said.

But not everyone was so hopeful.

"I don't think there will be peace in Afghanistan. We are seeing an increase in attacks on a daily basis," Imran, 13, told AFP.

 Defense ministry spokesman Mohammad Radmanesh told AFP there had been no reports of Taliban attacks on Afghan forces since the start of the holiday.

President Ashraf Ghani announced last week that police and troops would cease operations against the Taliban for eight days, starting Tuesday -- though he warned that operations against other groups, including the Islamic State group, would continue.

Muslims offer Eid prayers on the roof of an unfinished mosque in Manila. [AFP]

 The Taliban said Saturday their fighters would stop attacking Afghan security forces for the first three days of Eid, the first time the Taliban had declared a nationwide ceasefire in the nearly 17-year conflict.

They said they would continue attacking US-led NATO troops.

Libyan Muslim worshipers take a picture prior to performing Eid al-Fitr prayers at the Martyrs' Square in the capital Tripoli. [AFP]

Eid al-Fitr is one of Islam's most significant holidays, marking the end of the fasting month of Ramadan, and is typically celebrated by feasting and gift-giving by Muslims all over the world.