KABUL - Afghan President Ashraf Ghani said on Monday a peace agreement with one of the country's most notorious warlords is close to being concluded, offering hope of progress towards ending decades of conflict.

Negotiations with Hizb-i-Islami, a militant group of several hundred fighters led by Gulbuddin Hekmatyar, a veteran of almost 40 years of fighting in Afghanistan, have been going on since May, when a draft accord was signed.

But a final agreement has been held up with many on the government side suspicious of bringing the prominent Pashtun warlord into the political fold and civil rights activists concerned about longstanding accusations of human rights abuses against him.

Hekmatyar has been allied at various times with Pakistan, the Washington-backed anti-Soviet mujahideen in the 1980s and the Taliban, who are seeking to force the NATO-led coalition out of Afghanistan and bring in Islamic law.

"Some issues are left and those are issues that would be very important for implementing peace," Ghani said at the start of the three-day Eid holiday. "These issues should be solved within a limited period of time."

He thanked both Hizb-i-Islami and the High Peace Council for their efforts to negotiate a deal. "There is hope that, God willing, the agreement will be finalised soon and we will witness a major step toward the creation of peace environment and end of fighting," he said.

Hekmatyar, who was included on the US State Department's Specially Designated Global Terrorist list in 2003, has played relatively little direct part in the insurgency in recent years.

But an accord would offer some encouragement that the Kabul government can persuade militant groups to move away from the battlefield and into the political process after failed efforts to start peace talks with the Taliban.

During the bloody civil war of the 1990s, Hekmatyar's forces were accused of killing thousands of civilians in heavy bombardments of the Afghan capital and more recently, they were linked with several Al-Qaeda and Taliban attacks on international forces in Afghanistan and the Kabul government.

Peace talks with the Taliban, the largest insurgent group in Afghanistan, have yet to get off the ground, but both sides have said they are open to the idea.

In a statement commemorating the start of the Muslim holiday of Eid-ul-Adha on Monday, Taliban chief Mullah Haibatullah Akhundzada said his group was "continuing to make diplomatic efforts aimed at resolving the issue of Afghanistan alongside its military approach".

If inked, the deal with Afghanistan's second-biggest militant group would mark a symbolic victory for Ghani, who has struggled to revive peace talks with Taliban.

On Sunday, Hekmatyar's son said on Facebook the agreement had been reached but the High Peace Council, the government body responsible for negotiations, said talks were still underway.

Hekmatyar is widely believed to be living in hiding in Pakistan, but his group claims he is inside Afghanistan.

The potential deal, which is unlikely to have an immediate impact on the security situation in Afghanistan, has sparked revulsion from human rights groups.

According to a draft agreement seen by AFP, the government will offer Hekmatyar legal immunity in "all past political and military proceedings" as well as release of Hezb-i-Islami prisoners.

GUNMEN ATTACK HOSPITAL IN SOUTHERN AFGHANISTAN

Two gunmen entered a hospital in the southern Afghan city of Kandahar on Monday, setting off a gunbattle with security forces before both were killed, officials said.

Samim Khpalwak, a spokesman for the provincial governor of Kandahar, said the apparent target for the attack was the deputy governor who was intending to visit the hospital, a large regional facility that provides health services to war victims, including members of the army and police.

One member of the security forces was killed along with the two attackers in the exchange of fire.

Afghanistan has seen a string of militant attacks in recent months, denting confidence in the ability of the US-backed government to ensure security 15 years after the hardline Taliban were ousted.

Meanwhile, millions of war-weary Afghans on Monday marked Eidul Azha with prayers and feasting, hopeful of a brief respite from fighting that has seen record-breaking losses this year.

"Our country has been at war for nearly four decades, but the three days of Eid are the happiest days of our life because this an occasion where families come together and enjoy and celebrate this festival," Kabul resident Nasratullah Wafa told AFP.

The roads of the capital were mostly empty and many were blocked by military to safeguard against possible attacks, while police stood guard over mosques during the morning Eid prayers.

US Brigadier General Charles Cleveland in August said Afghan security forces were on track for their bloodiest year to date, surpassing the roughly 5,000 deaths of local police and troops and around 15,000 wounded in 2015.

He did not offer figures but said there was an increase of about 20 percent over the corresponding period last year.