U.N. spokesman Stephane Dujarric told reporters at U.N. headquarters in New York on Friday that "those responsible for this attack must be held accountable."
An Afghan official said at least 62 people were killed in the mosque explosion in eastern Nangarhar province that caused the roof to collapse.
Dujarric said the secretary-general "extends his deepest sympathy and condolences to the families of the victims and wishes a speedy recovery to those injured."
"He reiterates the solidarity of the United Nations with the people and government of Afghanistan," Dujarric said.
An Afghan official says at least 62 people have been killed in a mosque explosion that caused the roof to collapse in eastern Nagarhar province.
Attahullah Khogyani, spokesman for the provincial governor, says 36 others were wounded in the attack in the Haskamena district. He says there were children among the dead and wounded.
The attack took place as dozens of people gathered inside the mosque to offer weekly Friday prayers.
There was no immediate claim of responsibility.
An Afghan official says at least 20 people have been killed during Friday prayers when a mortar fired by insurgents blasted through the roof of a mosque.
Attahullah Khogyani, spokesman for the governor of eastern Nangarhar province, said 40 other people were wounded in Friday afternoon's attack in Haskamena district.
He says the victims include children who were at the mosque, and that the number of casualties could still rise as this was only the initial report.
On Thursday, a U.N. report said more than 2,500 civilians were killed and over 5,600 wounded in the first nine months of this year.