The US military says it carried out a deadly air strike on an al-Qaeda meeting in northern Syria and will investigate reports that more than 40 civilians were killed when a mosque was struck in a raid in the same area.

Jets struck the village of Al Jina, in Aleppo province, on Thursday at the time of evening prayer when the mosque was full of worshippers, with local activists saying up to 300 people were inside at the time of the attack.

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

The area's population has been swollen by refugees, according to United Nations agencies.

Bilal Abdul Kareem, a documentary filmmaker, visited the mosque and said that the toll of the attack was likely much higher than 42, as was reported by activists, as many of the victims had yet to be recovered.

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

US strike, 56 dead, last night in Jeena didn't hit HTS. Locals: 'It hit Tabligh gathering that happens evry Thursday for past 4 yrs pic.twitter.com/EufqRaTgV6 — Bilal Abdul Kareem (@BilalKareem) March 17, 2017

Al Jazeera's Natasha Ghoneim, reporting from Gaziantep on the Turkish-Syrian border, said Centcom admitted it carried out an air strike in Idlib but that the precise location of the attack was still in question.

"Right now, Syria Civil Defence personnel are struggling to get people from under the rubble of a mosque in the village of Al Jinah in the western countryside of Aleppo province," she said.

"They say that dozens of people were killed in the strike there and that several people are believed to be still alive under the rubble. They are trying to get them out and, according to Syria Civil Defence, more bodies are to be recovered.

"The US military is saying that they conducted an air strike in Idlib province and that this air strike was not targeting a mosque but a meeting of al-Qaeda members. They are saying that the confusion might be because the meeting was held about 15 metres away from a mosque but the US military is saying that the mosque is still standing.

"A reporter asked Centcom if they inadvertently targeted a mosque in Aleppo province instead of Idlib and they responded that they would be looking into the reports of civilian casualties."

'Several terrorists' killed

According to a Centcom statement: "US forces conducted an air strike on an al-Qaeda in Syria meeting location March 16 in Idlib, Syria, killing several terrorists."

Colonel John Thomas, spokesman for US Central Command, said: "We did not target a mosque, but the building that we did target - which was where the meeting took place - is about 15 metres from a mosque that is still standing."

"We are going to look into any allegations of civilian casualties in relation to this strike," Thomas said when asked about reports from the Syrian Observatory for Human Rights that 42 people died.

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.

"Many people are still trapped under rubble and we believe the number of casualties will increase," he told the DPA news agency.

The Idlib Press Centre, which is run by activists, said at least 50 people were killed in the attack.

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

READ MORE: Talking love and revolution in war-torn Syria

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.

The war, which on Wednesday entered its seventh year, started as a largely unarmed uprising against President Bashar al-Assad's rule in March 2011.

It has since escalated into a full-scale conflict that has left hundreds of thousands of people dead and more than half of the country's prewar population displaced inside and outside of Syria.