A video grab, provided by the Revolutionary Forces of Syria, shows smoke rising after an airstrike on the village of Haas.
Photograph: AP

The White House has directly accused either Syria or Russia of being behind airstrikes that destroyed a school complex on Wednesday.

Rescue workers at the site in northern Syria described scenes of anguish and fear as fresh details emerged of the attack that levelled much of the area and killed almost 40 people. A senior UN official described the attack as a possible war crime.

The airstrikes on the school district in the town of Haas in Idlib province on Wednesday morning were described as potentially the worst bombing of the sort on a school since the start of the civil war five and a half years ago.

“We don’t know yet that it was the Assad regime or the Russians that carried out the airstrike, but we know it was one of the two,” White House spokesman Josh Earnest said. “Even if it was the Assad regime that carried it out, the Assad regime is only in a position to carry out those kind of attacks because they are supported by the Russian government.”

A doctor who treated many of the wounded at a local hospital, and asked that his name and the name of his medical facility not be used, said most of the dead were children aged six to 15 as well as female teachers.

Rescue workers and locals said at least 35 people were killed and more than 30 wounded in the 10.30am bombing, but the doctor put the number of injured at more than 100. He said that about 40 people had required surgery in what he described as a massacre and that many of the children who had arrived at the hospital had lost limbs.

“Out of 120 wounded, there were about 40 children and 30 to 40 women, and the rest were various ages, mostly parents, who went to find out what happened to their children and ended up getting hurt in follow-up airstrikes,” he said. “They were all civilians. There were no terrorists or armed men or fighters.”

Images provided by the doctor showed wounded children at the hospital as well as the corpses of children at the scene of the bombing, with a pink school bag lying on the wrapped body of one.

“It’s a school district,” said Ahmed Sheikho, a volunteer with the local civil defence rescue group who visited the site of the attack. “It’s just a tiny, quiet village; there was no justification whatsoever. It was such a difficult scene, so many children torn into pieces, and schoolteachers.

“There was fear and terror and weeping and screams among the families and children. The pain of the people was evident in the faces of everyone.

“In the mosques, one man was calling out in the loudspeaker that if anyone was missing their child to come find them among the victims who were laid out in the mosque.”

The attack in Idlib was followed on Thursday by the apparent shelling of a school on the government-held side of the divided city of Aleppo. Syrian state media said the attack, which was confirmed by residents and took place in the district of Shahbaa, killed three children at Aleppo’s national school and wounded several others. Three other children were killed in another shelling incident at a residential neighbourhood near the frontline.

The targeting of schools in such short succession highlighted the abandon with which the war in Syria is being fought. The regime of Bashar al-Assad and his Russian allies have been responsible for hundreds of civilian casualties in Aleppo, deploying an increasingly violent arsenal that includes powerful bunker buster bombs.

The latest attack in Idlib, which took place while students were leaving four schools adjacent to each other, was a stark reminder of the violence gripping much of the rest of the country.

“This is a tragedy, it is an outrage and, if deliberate, it is a war crime,” said Unicef’s executive director, Anthony Lake.

“This latest atrocity may be the deadliest attack on a school since the war began more than five years ago. Children lost for ever to their families … teachers lost for ever to their students … one more scar on Syria’s future. When will the world’s revulsion at such barbarity be matched by insistence that this must stop?”

Idlib province is held by a coalition of opposition fighters, including western-backed Free Syrian Army elements and the former al-Qaida affiliate Jabhat Fateh al-Sham.

Rescue workers and witnesses said the school bombing had been preceded by the appearance of reconnaissance planes. Many of the children were returning home amid fears that their neighbourhoods would be targeted by airstrikes.

A report on Syrian state TV quoted a military source saying a number of militants had been killed when their positions were targeted in the town, but made no mention of a school.

A Russian foreign ministry spokeswoman said Moscow had nothing to do with the strikes and that it had demanded an immediate investigation. Claims that Russian and Syrian warplanes were involved were a lie, she said.

Vitaly Churkin, Russia’s ambassador to the UN, said: “It’s horrible. I hope we were not involved. It’s the easiest thing for me to say no, but I’m a responsible person, so I need to see what my ministry of defence is going to say.”

Unicef said it had verified at least 38 attacks on schools around Syria since the beginning of 2016 in government-held areas and rebel-controlled territory.

Juliette Touma, the regional Unicef communication chief, told the Associated Press that, before Wednesday’s attack, 32 children had been killed this year in attacks on schools.

Western countries and international human rights groups have regularly highlighted the high number of civilian deaths reported after Syrian and Russian airstrikes.

In a blistering indictment on Wednesday, the UN humanitarian chief, Stephen O’Brien, called the failure of the UN security council, and Russia in particular, to stop the bombing of rebel-held eastern Aleppo as “our generation’s shame”.

“Let me take you to east Aleppo this afternoon,” O’Brien told the security council. “In a deep basement, huddled with your children and elderly parents, the stench of urine and the vomit caused by unrelieved fear never leaving your nostrils, waiting for the bunker-busting bomb you know may kill you in this, the only sanctuary left to you, but like the one that took your neighbour and their house out last night; or scrabbling with your bare hands in the street above to reach under concrete rubble, lethal steel reinforced bars jutting at you as you hysterically try to reach your young child, screaming unseen in the dust and dirt below your feet, you choking to catch your breath in the toxic dust and the smell of gas ever-ready to ignite and explode over you.

“These are people just like you and me – not sitting around a table in New York but forced into desperate, pitiless suffering, their future wiped out.”

O’Brien added that he was “incandescent with rage” over the security council’s passivity. “Peoples’ lives [have been] destroyed and Syria itself destroyed. And it is under our collective watch,” he said. “And it need not be like this – this is not inevitable; it is not an accident ... Never has the phrase by poet Robert Burns, of ‘man’s inhumanity to man’ been as apt. It can be stopped but you, the security council, have to choose to make it stop.”

Churkin reacted by denouncing O’Brien’s vivid account of the humanitarian toll in the besieged city as “unfair and dishonest”. He told O’Brien to leave his comments “for the novel you’re going to write some day”.