‘Plan, prepare, and train for the outbreak of chaos,’ says al Qaeda’s handbook, The Management of Savagery, a blueprint for building the Caliphate through what might be called creative destruction. ‘At the outbreak of chaos, the onset of jihad: ride the wave…exploit the situation.’ Did Steve Bannon, Donald Trump’s new chief strategist, read The Management of Savagery? He has been accused of implementing a ‘chaos theory of government’. Create chaos. Destroy the old order. Build paradise. The Trump administration has seemed busily engaged in phase one during its first two, hair-raising weeks in office. For the critics, the military raid against al Qaeda in Yemen was the inevitable outcome -- a disaster, they say, that need not have happened but for Trump’s character flaws and Bannon’s fanaticism. The truth, however, is more complicated.

President Trump approved the raid over dinner at the White House. Bannon was there, ignoring those (including a former chairman of the Joint Chiefs) who say political operatives like him should be kept far away from national security. The US TV networks are reporting that the aim was to kill or capture the leader of al Qaeda in Yemen. This would be a ‘game changer’, Trump was supposedly told by his Secretary of Defence, one that President Obama had not been ‘bold enough’ to attempt. This account is disputed by the White House but it’s easy to imagine Trump being unable to resist a plan put in such terms. Whatever really took place, these life or death decisions were taken not in the Situation Room but (perhaps) over one of the steaks that Trump orders cooked like a hockey puck. The optics, as they say in Washington, were not good, especially in light of what happened next.

The raid went wrong from the start. Something – a barking dog, radio chatter -- alerted the village and US Special Forces were met with heavy automatic fire. Women and children were killed. A Navy SEAL died, Chief Petty Officer William ‘Ryan’ Owens. A $75m Osprey transport plane came down hard and had to be destroyed in place. After the Americans had limped away, the al Qaeda leader in Yemen, Qassim al-Rimi, issued a mocking statement: 'The new fool of the White House has received a painful slap across his face.' More damaging for President Trump, Reuters quoted anonymous ‘US military officials’ as saying the operation had been authorised ‘without sufficient intelligence, ground support or adequate backup preparations’. The message from at least some at the Pentagon was clear: this was a rash operation, dictated by politics – the military were not to blame.

The White House Press Secretary, Sean Spicer, in language he may come to regret, waved the dead SEAL’s shroud at the doubters. ‘Anybody who undermines the success of that raid owes an apology and [does] a disservice to the life of Chief Owens,’ he said. An ‘unbelievable amount of intelligence’ had been seized that would ‘prevent potential attacks on American soil'. This was the aim of the raid, he maintained; the Yemeni al Qaeda leader was never the target. According to Spicer’s ‘tick-tock’, the US military came up with the plan last November and it was approved by an ‘interagency deputies’ meeting’ in early January, when President Obama was still in charge. But the plan called for a ‘moonless night’ and the next one would be after President Trump’s arrival. That is at odds with the claims that there wasn’t enough advance intelligence or that President Obama was simply not convinced. But Spicer’s timeline makes clear that this was always the military’s plan, not Trump’s or Bannon’s. In fact, the raid was typical of the way the war against al Qaeda – and the Taliban and Isis – has been fought for the past 15 years. And that is the problem.

The US military said they were attacking a fortified al Qaeda base, a headquarters in a heavily defended compound. But the ‘headquarters’ may have been a two-room house and the ‘determined enemies’ may have included at least some women firing blindly and panicked into the night. A former international official with long experience in Yemen told me about the village where the raid took place: ‘There isn’t even mobile phone coverage there. You have to walk up this mountain in order to make calls. The idea that this group of stone houses could be hosting some kind of plot to attack the US is ludicrous.’ He went on: ‘This was an Obama era op they decided to go ahead with. But this is not the Global War on Terror. AQ don't really exist in Yemen, never mind Isis. They're playing in something they don't have a clue about. It's a local conflict with actors in a local war.’

Baraa Shiban, a Yemeni who works for the human rights group Reprieve, agreed. He first went to the village, Yakla, in 2013 when a missile fired from a US drone hit a wedding convoy. The bride and her family were killed, along with many other civilians. Local people didn’t like the jihadis, he said, because when they arrived, the drones followed. The tribal leader whose house was attacked may have sworn allegiance to al Qaeda, Shiban said, but that wasn’t certain – and if he had done so, it would have been to strengthen his position locally. At least as likely, he felt, was that the sheikh had been labelled al Qaeda by his enemies in the capital, Sanaa. The intelligence services there were still controlled by the former president Ali Abdullah Saleh, ousted after 33 years in power but eager to return. He was adept at playing the Americans and kept tribal rivals in line with the threat of bringing the US military to their door.

Saleh is now allied with the Houthi rebels he spent years fighting as president. They are being bombed by a US-backed, Saudi-led coalition. In Yemen, the war has pushed the country to the brink of famine, as these distressing pictures from Unicef show. Working with the people you are also bombing is the kind of strategic incoherence that bedevils the Americans in Syria. In Syria, the geopolitics are impossibly complicated; in Yemen it's the tribal politics.

If the picture of tribal politics in Yakla is accurate, there may have been little real ‘intelligence’ for the Americans to find. A bomb making video seized in the raid turned out to be ten years old and already on the internet. Al Qaeda in the Arab Peninsula, AQAP, as the Yemeni branch is known, have certainly declared their intention to attack the United States. But a grand total of three attacks on the US homeland can be attributed to AQAP. One of those was a failed plot to send letter bombs to two synagogues, another the amateurish ‘underwear bomber’s’ attempt to blow himself up on a plane. ‘Al Qaeda lost its capability to strike outside Yemen a long time ago,’ Shiban said. ‘I do believe they are real and they are a threat – but they are a threat primarily to the Yemeni people. That’s why you should be working with these people, not killing them. Those are literally your allies.’

Alongside 14 armed men killed in Yakla, Shiban said local people counted 23 civilian dead: 10 children, six women, and seven men. Another report says 25 civilians were killed, the youngest casualty a baby girl three months old. The Arab Twittersphere is full of pictures of the bloodied corpses of children. In 2013, the former deputy chief of mission at the US embassy in Sanaa, Nabeel Khoury, wrote: ‘Drone strikes take out a few bad guys to be sure, but they also kill a large number of innocent civilians. Given Yemen’s tribal structure, the U.S. generates roughly forty to sixty new enemies for every AQAP operative killed by drones.’ That arithmetic has not changed.

Still, the US military apparently wants to loosen its rules of engagement in the war against the forces of global jihad (represented by Isis as well as al Qaeda). Those in uniform cannot state their views openly but a retired US Air Force general, David Deptula, told me last year: ‘The laws of armed conflict do not require, nor do they expect, a target of zero unintentional civilian casualties...There is no such thing as immaculate warfare, it’s a horrible thing, an ugly thing…we need to finish it as rapidly as possible.’ That is in line with President Trump’s position. ‘I will quickly and decisively bomb the hell out of Isis,’ he said during the campaign. ‘Isis will be gone…and they'll be gone quickly. Believe me.’

A senior US official dealing with foreign policy told me Trump’s people had informed him that the president was looking for ‘a big win over Isis within 90 days’. That terrified him. ‘Are we going to carpet bomb Mosul?’ he asked. If that is the question to President Trump from the US military, the Yemen raid shows that the answer might well be ‘Yes’.

Paul Wood is a BBC correspondent and fellow of the New America foundation in Washington