Gunmen opened fire on worshippers inside a mosque in eastern Nangarhar province, killing four people, according to a provincial official.
Attahullah Khogyani, the provincial governor's spokesman, said three other people, including the mosque's religious leader, were wounded in the attack, which took place on Sunday evening in the district of Surkh Rod.
No one immediately claimed responsibility for the attack, but both the Taliban and Islamic State militants are active in eastern Afghanistan, especially in Nangarhar province.
Earlier on Sunday, an Islamic State suicide bomber struck near Kabul's airport, killing 20 people and narrowly missing Afghanistan's vice president, who was returning home after living in Turkey for over a year.
Gen. Abdul Rashid Dostum, a former Uzbek warlord, and his entourage were unharmed, but more than 70 other people were wounded, according to Hashmat Stanekzai, spokesman for the Kabul's police chief.
Among those killed in the attack near the airport was Mohammad Akhtar, a 31-year-old father of four children who was working as driver for the news agency Agence France Presse in Afghanistan.
Hundreds of relatives, friends and family members attended a burial ceremony for Akhtar in the Guldara district north of the capital Kabul on Monday morning.
In April AFP's chief photographer in Afghanistan, Shah Maria killed along with eight other reporters in a double suicide bombing by the Islamic State group in Kabul.
The attack marked the deadliest assault on reporters since the fall of the Taliban in 2001 and claimed a total of 25 lives and wounded at least 45 others.
Akhtar was related to the late Maria and was on his way to office for his night shift when the suicide bomber blew himself up near the airport.
"There were both military and civilians who were killed and wounded in the attack and the dead toll could change," said Stanekzai, spokesman for the Kabul police chief.
The number of civilians killed in Afghanistan in the first half of this year has increased by 1 percent, according to the latest report by the United Nations, compared to the same period last year.
The U.N. mission in Afghanistan said the number - 1,692 killed by violence - is the highest 6-month death toll since the systematic documentation of civilian casualties started in 2009.
The UNAMA report documented 3,430 Afghan civilians were wounded in the period from January to June. The killed and wounded add up to a total of 5,122 civilian casualties, which is a three percent overall decrease from the first six months of 2017, it added.
Since the U.S. and NATO forces formally concluded their combat mission at the end of 2014, a resurgent Taliban has stepped up its attacks across the country and an Islamic State affiliate has also emerged to launch horrific high-profile attacks that have claimed the lives of scores of civilians.