Attahullah Khogyani, spokesman for the governor of Nangarhar Province, said the militant attack wounded 36 others. He said it was not immediately clear if the mosque was attacked by a suicide bomber or by some other type of bombing.
"Both men and children are among those killed and wounded in the attack," he said.
Sediq Sediqqi, spokesman for Afghan President Ashraf Ghani, strongly condemned the attack on his official Twitter account. "The Afghan government strongly condemns today's suicide attack in a mosque in Nangarhar province," he tweeted.
"The Taliban and their partners heinous crimes continue to target civilians in time of worship," he added.
No one immediately claimed responsibility for the attack, but both the Taliban and the Islamic State group are active in eastern Afghanistan, especially Nangarhar province.
However, Zabihullah Mujahid, the Taliban's spokesman in a statement condemned the attack in Nangarhar and called it a serious crime.
Zahir Adil, spokesman for the public health department in Nangarhar Province, said 23 of the wounded were transferred to Jalalabad, the provincial capital, and the rest were being treated in the Haskamena district clinic.
The spokesman for U.N. Secretary-General Antonio Guterres said Guterres "strongly" condemned the attack and said those responsible must be held accountable.
Amnesty International's deputy South Asia director, Omar Waraich, said the attack "demands the world's attention."
"Flagrant violations of international humanitarian law such as deliberate targeting of civilians are not something anyone should get used to or learn to ignore," he said.
The violence comes a day after a United Nations report said that Afghan civilians are dying in record numbers in the country's increasingly brutal war, noting that more civilians died in July than in any previous one-month period since the U.N. began keeping statistics.
"Civilian casualties at record-high levels clearly show the need for all parties concerned to pay much more attention to protecting the civilian population, including through a review of conduct during combat operations," said Tadamichi Yamamoto, the U.N. secretary-general's special representative for Afghanistan.
The report said that pro-government forces caused 2,348 civilian casualties, including 1,149 killed and 1,199 wounded, a 26% increase from the same period in 2018.
The report said 2,563 civilians were killed and 5,676 were wounded in the first nine months of this year. Insurgents were responsible for 62%. July to September were the deadliest months so far this year.
Efforts to restart talks to end Afghanistan's 18-year war picked up earlier this month, just weeks after President Donald Trump last month declared the talks "dead," blaming a surge in violence by the Taliban that included the killing of a U.S. soldier.
U.S. peace envoy Zalmay Khalilzad visited Pakistan and met with the Taliban's top negotiator, Mullah Abdul Ghani Baradar. Baradar is a co-founder of the hard-line Islamic movement and was head of a Taliban delegation to the Pakistani capital.
U.S. officials said Khalilzad was only in the Pakistani capital to follow up on talks he held in September in New York with Pakistani officials, including Prime Minister Imran Khan. They insisted he was not in Pakistan to restart U.S.-Taliban peace talks.
In western Herat province, six civilians including four children were killed Thursday when their vehicle was hit by a roadside bomb, said Jelani Farhad, spokesman for the provincial governor. He added that five other civilians were wounded in the attack in the Zawal district.
Copyright 2019 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.