WASHINGTON (AP) — Well-trained attackers executed the deadly dawn assault on a CIA complex in Benghazi, Libya, suggesting different perpetrators from those who penetrated the U.S. diplomatic mission the previous night, according to newly revealed testimony from top military commanders.

The initial attack, on Sept. 11, 2012, killed U.S. Ambassador Chris Stevens and communications specialist Sean Smith and set the mission ablaze. Nearly eight hours later at the CIA complex nearby, two more Americans, contract security officers Tyrone Woods and Glen Doherty, died in a mortar attack that showed clear military training, retired Gen. Carter Ham told Congress in closed-door testimony earlier this year.

The House Armed Services Committee released the testimony Wednesday.

The second assault probably was the work of a new team of militants who had seized on reports of violence at the diplomatic mission the night before and hit the Americans while they were most vulnerable, according to testimony that could clarify the events. The testimony also reveals how little information the military had on which to base an urgent response.

Bitter recriminations in the U.S. followed the 2012 attacks, including Republican-led congressional investigations and campaign-season denunciations of the Obama administration, which made inaccurate statements about the Libyan attacks. The testimony released Wednesday underscored a key detail that sometimes has been lost in the debate: that the attacks were two distinct events over two days on two different buildings, perhaps by unrelated groups.

The U.S. government still has not fully characterized the first attack in which, according to Ham and eight other military officers, men who seemed familiar with the lightly protected diplomatic compound breached it and set it on fire, killing Stevens and Smith. A disorganized mob of looters then overran the facility.

In testimony to two House panels earlier this year, the officers said that commanders didn’t have the information they needed to understand the nature of the attack, that they were unaware of the extent of the U.S. presence in Benghazi at the time and they were convinced erroneously for a time that they were facing a hostage crisis without the ability to move military assets into place that would be of any use.

To this day, despite the investigations, it’s not clear if the violence resulted from a well-planned, multiphase military-type assault or from a loosely connected, escalating chain of events.

Two House panels — Armed Services and Oversight and Government Reform — conducted interviews with the nine officers on separate days from January to April.

In their testimony, military officials expressed some uncertainty about the first attack, describing protests and looting in an assault that lasted about 45 minutes.

The military attache to the U.S. Embassy in Tripoli told Congress the first attack showed some advance planning. The Libyan police officer guarding the diplomatic compound fled as it began.

The defense attache, whose name wasn’t released, suggested the attackers “had something on the shelf” — an outline of a plan based on previously obtained information about the compound and its security measures, so they were ready to strike when the opportunity arose.

“They came in, and they had a sense of purpose, and I think it sometimes gets confused because you had looters and everyone else coming in,” he said. “It was less than kind of full, thought-out, methodical.”

Ham testified that the second attack, which killed Woods and Doherty at the annex a mile from the diplomatic compound where the assault began the night before, showed clear military training. It was probably the work of a new team of militants, taking advantage after reports of violence at the first site and American vulnerability.

“Given the precision of the attack, it was a well-trained mortar crew, and in my estimation they probably had a well-trained observer,” said Ham, who headed the U.S. command in Africa. The second attack showed “a degree of sophistication and military training that is relatively unusual and certainly, I think, indicates that this was not a pickup team. This was not a couple of guys who just found a mortar someplace.”

Ham said the nearly eight-hour time lapse between the two attacks also seemed significant. “If the team (that launched the second attack) was already there, then why didn’t they shoot sooner?” he asked.

“I think it’s reasonable that a team came from outside of Benghazi,” he said of the second attack in testimony on April 9. Violent extremists saw an opportunity “and said, ‘Let’s get somebody there.'” He also acknowledged that the absence of American security personnel on the ground soon enough after the first attack “allowed sufficient time for the second attack to be organized and conducted,” he said.

Stevens had gone to Benghazi from the embassy in Tripoli to open a cultural center, State Department officials said.

The attacks came as President Barack Obama was in a close re-election battle, campaigning in part on the contention that al-Qaida no longer posed a significant threat to the United States and that, blending the economy and the fight against terrorism, General Motors was alive but “Osama bin Laden is dead.” A terror attack on American assets could have damaged that argument.

Five days after the attack, after feverish email exchanges about her “talking points” among national security staff members and their spokesmen, U.N. Ambassador Susan Rice linked the Benghazi attacks to protests in Tunisia and Cairo over an anti-Islam video. Weeks later, U.S. officials retracted that account but never fully articulated a new one.

Republicans seized on the inaccuracies, contending that the Obama administration was covering up a terror attack for political gain.

Several congressional and independent investigations have faulted the State Department for inadequate security, but they have not provided a full reading of who was involved in the violence, what the motives were and how they could pull off such a seemingly complicated, multipronged assault.

People on both sides of the debate tend to link the two incidents as one attack.

The congressional testimony that distinguishes the attacks came from military officials in Tripoli or, like Ham, coordinating the response in Washington. Most have never given a public account. But they agreed that confusion reigned from the outset.

“We’re under attack,” was the first report the military received from Benghazi. That message came from Stevens’ entourage to Tripoli in the late afternoon of Sept. 11. Word was relayed to the defense attache, who reported up the chain of command.

That report gave no indication about the size or intensity of the attack.

The defense attache testified that the assault on the diplomatic mission was followed by a mob that complicated and confused the situation.

He said of the original attackers, “I don’t think they were on the objective, so to speak, longer than 45 minutes. They kind of got on, did their business, and left.” For hours after that, he said, there were looters and “people throwing stuff and you see the graffiti and things like that.”

Once the first attack ended around 10 p.m., the military moved to evacuate Americans from Benghazi, while preparing for what it erroneously believed might have been an emerging hostage situation involving Stevens.

In fact, Stevens died of smoke inhalation after the diplomatic post was set on fire in the first attack.

Seven-and-a-half hours later, at dawn, mortars crashed on a CIA compound that had been unknown to top military commanders.

The military worked up a response on numerous fronts.

At one point, fewer than 10 U.S. military personnel in Libya were grappling with the mortar and rocket-propelled grenade attack on Americans who had taken cover at the CIA facility and, some 600 miles away, the evacuation of about three dozen people from the U.S. Embassy in Tripoli by a convoy of armored vehicles.

An unarmed Predator drone conducting an operation nearby in eastern Libya had been repositioned over Benghazi, yet offered limited assistance during the nighttime and with no intelligence to guide it. A standby force training in Croatia was ordered to Sicily, while another farther afield was mobilized. Neither was nearly ready in time to intervene during the first 45-minute attack and couldn’t predict the quick mortar attack the next morning. An anti-terrorism support team in Spain was deployed, though it, too, was hours away.

American reinforcements of a six-man security team, including two military personnel, were held up at the Benghazi airport for hours by Libyan authorities. Drone images and intelligence hadn’t provided indications of a new attack, but word eventually came from two special forces troops who had made it to the annex and reported casualties from the dawn attack up the chain of command.

In Tripoli, military and embassy officials were evacuating the embassy there and destroying computer hardware and sensitive information.

The administration last month apprehended its first suspect, Ahmed Abu Khattala, and brought him to the United States to stand trial on terrorism charges.

The Justice Department maintains in court documents that Abu Khattala was involved in both attacks, and it describes the first breach on the diplomatic post as equally sophisticated. The government said a group of about 20 men, armed with AK-47- rifles, handguns and rocket-propelled grenade launchers, stormed the diplomatic facility in the first attack.

Abu Khattala supervised the looting after Americans fled, the government says, and then returned to the camp of the Islamist militant group Ansar al-Sharia, where the Justice Department says a large force began assembling for the second attack.

The Justice Department provided no supporting documentation for those conclusions. They also reflect the divisions among current and former government officials about the two attacks.

In her book “Hard Choices,” former Secretary of State Hillary Rodham Clinton wrote that there were scores of attackers with different motives. “It is inaccurate to state that every single one of them was influenced by this hateful video. It is equally inaccurate to state that none of them were. Both assertions defy not only the evidence but logic as well.”

Abu Khattala’s lawyer says the government has failed to show that he was connected to either attack.

Ham, who happened to be in Washington that week, briefed Defense Secretary Leon Panetta and Joint Chiefs Chairman Gen. Martin Dempsey. They informed the president.

Many of the military officials said they didn’t even know about the diplomatic mission in Benghazi, let alone the CIA’s clandestine installation nearby. Few knew of Stevens visiting the city that day. Given all of the confusion, Ham said there was one thing he clearly would have done differently: “Advise the ambassador to not go to Benghazi.”

Copyright 2014 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.