This is an archived article and the information in the article may be outdated. Please look at the time stamp on the story to see when it was last updated.

(CNN) – A US military raid in Yemen that killed civilians and a Navy SEAL has proven another political headache for US President Donald Trump just days into his presidency.

At least 23 civilians, including women and children, were killed in the January 29 mission on an al Qaeda in the Arab Peninsula (AQAP) target, according to London-based NGO Reprieve and a Sanaa-based human rights worker.

The Trump administration has described the mission as “absolutely a success,” but Yemeni officials and US Senator John McCain have criticized the operation.

Here’s how the raid unfolded.

THE PLAN

The raid had been planned for months, and the Obama administration first considered and approved it late last year, multiple officials told CNN. But it was delayed for “operational reasons,” according to Obama administration officials, who said he never signed off on this specific operation before leaving office.

Trump first learned about the plan from National Security Adviser Michael Flynn on the morning of January 25, five days after his inauguration, a White House official told CNN.

At a dinner in the White House residence that evening, Trump gave his conditional go-ahead to his top military brass on the advice of Flynn, his defense secretary nominee James Mattis and Gen. Joseph Dunford, chairman of the Joint Chiefs of Staff. He officially signed off on the plan a day later.

THE RAID

The raid was on an al Qaeda compound in Yemen’s Al Bayda province and was considered relatively risky. The goal was to collect intelligence needed to aid future strikes against al Qaeda and prevent terror attacks, a military official said. The forces also hoped to target or gain intelligence to help find the leader of AQAP, Qassim al-Rimi, according to a senior US military official.

The raid involved elite US Navy SEALs and special forces from the UAE, with armed drones flying overhead in support, according to officials from several countries. But as forces approached the compound, they were detected and an intense firefight broke out. Chief Petty Officer William “Ryan” Owens was killed and three other SEALs were injured.

During the battle, al Qaeda fighters took up firing positions on the roof of a nearby building. As the US troops came under fire, they called in an airstrike against the building, which likely led to civilian casualties, military officials said.

But the raid appears to have achieved some of its goals. US Central Command said three senior AQAP officials were killed and valuable intelligence retrieved.

THE AFTERMATH

The raid was described as a “failure” by a senior Yemeni military official on Wednesday who said that his government had asked the US to stop ground operations in the country without its approval.

But a US defense official said Yemen was notified before the raid happened and denied that any additional restrictions have been placed, saying “nothing has changed.”

Before the raid, the US had “a green light for conducting ground missions,” the Yemeni official told CNN, speaking on condition of anonymity. But that light “is now red,” he said.

Senator McCain, who chairs the Senate Committee on Armed Services, said in statement that many objectives of the raid had been met. But, he added, “I would not describe any operation that results in the loss of American life as a success.”

White House Press Secretary Sean Spicer responded by calling for McCain to apologize. He described the raid as “absolutely a success,” adding that “I think anyone who would suggest it’s not a success does disservice to the life of Chief Ryan Owens.”

The raid also appeared to amuse al-Rimi, the AQAP leader. “The new fool of the White House received a painful slap across his face,” he said in an 11-minute audio message, taunting Trump.

DEJA VU?

But the raid that has attracted such criticism and scrutiny early in Trump’s presidency is not the first of its kind.

Obama also oversaw the air campaign in Yemen against al Qaeda targets, and his first strike in 2009 was a disaster — it mistakenly took a Bedouin village for a terrorist training camp, killing 41 civilians, according to Human Rights Watch, in addition to 14 suspected terrorists.

And while the January raid reportedly killed Anwar al-Awlaki’s daughter, a 2011 strike ordered by the Obama administration killed the former AQAP leader’s son.

As the Obama administration tried to soften some of the hard-handed tactics inherited from the Bush administration in the country’s war on terror, it ratcheted up the drone program to target terrorist groups without putting US lives in danger. The Obama administration vastly accelerated the campaign in Yemen after the Arab Spring uprisings.

The US has focused on Yemen since it launched its global “war on terror” following the 9/11 attacks in 2001.

WHAT NEXT?

The Yemen embassy in Washington said that it would continue to work with the US in counter-terrorism operations, so it is unclear if the raid will change much at all.

But the raid has highlighted the fact that AQAP remains a formidable, resilient force and is more deeply entrenched in Yemen’s tribal society than ever, CNN’s Tim Lister reports.

Operations against terrorist targets are a big part of bringing stability back to the country, which is by many measures a failed state. A civil war broke out in 2015 and has left an estimated 10,000 people dead, the UN reports, while starvation has hit entire villages and some 1.5 million children remain malnourished.

The government that works with the US has been pushed out of the capital, Sanaa, by Houthi rebels, who, like AQAP, have also taken swathes of territory from government control.

A Saudi-led coalition has carried out regular airstrikes on the country against the rebels and AQAP targets to prop up the internationally recognized government.