The United States has denied hitting a mosque in Syria where activists say dozens of people, mostly civilians, were killed.

The Pentagon said the US targeted an "al-Qaeda gathering across the street from a mosque", and released footage showing that a mosque next to a destroyed building remained standing. It said the photo was taken less than five minutes after the strike on Thursday.

Syrian opposition activists said at least 40 people were killed in the Omar Ibn al-Khattab Mosque in Al Jinah village in Aleppo province. They accused the US of carrying out the raid.

Friday prayers were cancelled across rebel-held parts of northern Syria after the raid.

Bahaa al-Halaby, an Aleppo-based opposition activist based, said the air raid hit as about 250 people had gathered at the mosque for prayers or to attend a religious lesson.

The UK-based Syrian Observatory for Human Rights said the air strike on the mosque killed 46 while the Local Coordination Committees, another monitoring group, said 40 were killed.

Resident Abu Muhammed told the AFP news agency that he "heard powerful explosions when the mosque was hit. It was right after prayers at a time when there are usually religious lessons for men in it.

"I saw 15 bodies and lots of body parts in the debris when I arrived. We couldn't even recognise some of the bodies," he said

Pentagon spokesman, Eric Pahon, said US surveillance of the target area indicated evening prayers already had concluded before the attack.

He said the building that was struck was a "partially constructed community meeting hall" that al-Qaeda leaders used to gather and "as a place to educate and indoctrinate al-Qaeda fighters".

"Initial assessments based upon post-strike analysis do not indicate civilian casualties," Pahon said. He said the Pentagon would investigate any credible allegations it received.

US claims that it's air strike that killed 56 in Jeena didn't hit the mosque are false. See for yourself pic.twitter.com/tInKTlMTME — Bilal Abdul Kareem (@BilalKareem) March 17, 2017

Al Jinah lies in one of the main rebel-held parts of Syria, encompassing the western parts of Aleppo province and neighbouring Idlib.

Bilal Abdul Kareem, a documentary filmmaker, visited the mosque and posted footage online.

Rami Abdel Rahman, head of the Observatory, which monitors the war via a network of contacts across Syria, said that most of those killed were civilians.

Activists posted pictures of bodies scattered on the floor near the mosque.

Teams with the White Helmets, or Syria Civil Defence, a volunteer rescue group that operates in rebel-held parts of Syria, shared images of people being pushed into ambulances and panic-stricken residents searching among the rubble for survivors.