WASHINGTON (AP) — All was quiet outside the U.S. Consulate as evening fell on Benghazi and President Barack Obama's envoy to Libya was retiring after a day of diplomatic meetings.

There was no indication of the harrowing events that night would bring: assailants storming the compound and setting its buildings aflame, American security agents taking fire across more than a mile of the city, the ambassador and three employees killed and others forced into a daring car escape against traffic.

Senior State Department officials on Tuesday revealed for the first time certain details of last month's tragedy in the former Libyan rebel stronghold, such as the efforts of a quick reaction force that rushed onto the scene and led the evacuation in a fierce gun battle that continued into the streets. The briefing was provided a day before department officials were to testify to a House committee about the most serious attack on a U.S. diplomatic installation since al-Qaida bombed the U.S. embassies in Kenya and Tanzania 14 years ago.

The account answers some questions and leaves others unanswered. Chief among them is why for several days the Obama administration said the assault stemmed from a protest against an American-made Internet video ridiculing Islam, and whether the consulate had adequate security.

The officials, who spoke to reporters on condition of anonymity because they weren't authorized to speak publicly on the matter, said Ambassador Chris Stevens arrived in Benghazi and held meetings on and off the consulate grounds on Sept. 10. He spent the night, and then out of prudence spent the whole of the 11th anniversary of the 9/11 attacks meeting people inside the compound, an enclosed area about 300 yards long by 100 yards wide, with a 9-foot outer wall topped by barbed wire and augmented by barriers, steel drop bars and other security upgrades.

When Stevens finished his final meeting of the day, he escorted a Turkish diplomat outside the main entrance of the building. The situation was calm, the officials said, and there were no protests. Five U.S. agents and four local militiamen were providing security.

Story continues

A little more than an hour later, around 9:40 p.m., everything changed.

The compound's agents were alerted by loud noises, gunfire and explosions near the front gate. A barracks near the entrance for the local militiamen was burned down. In the control center, agents watched on cameras as a large group of armed men flowed into the compound. They immediately sounded the alarm and made telephone calls to the embassy in Tripoli, officials in Washington, the Libyan authorities and the U.S. quick reaction force located at a second compound a little over a mile away.

One agent, armed with a sidearm and an assault rifle, took Stevens and State Department computer specialist Sean Smith to a safe room inside one of the compound's two main residences — an area protected by a heavy metal grill and several locks and stocked with medical supplies and water. The other agents rushed to equip themselves with long guns, body armor, helmets and ammunition at other buildings. Two tried to make it to the building with Stevens but took fire and were forced to retreat.

The attackers began to overrun the compound, the officials recounted. The intruders penetrated Stevens' building and tried to break the grill locks for the safe room but couldn't gain access. So they dumped cans of diesel fuel in the building, lit furniture on fire and set aflame part of the exterior of the building.

In the compound's other residence, two agents barricaded themselves against the attackers who had gotten inside the building. The attackers failed to enter the tactical operations center, where the last two agents were located, smashing the door but failing to break it.

Meanwhile, Stevens' building rapidly filled with thick diesel smoke and fumes from the burning furniture. Inside, visibility was less than 3 feet and, unable to breathe, the Americans went to a bathroom and opened a window, trying to get air. They decided to get out of the building. The security agent went first, flopping out onto a patio enclosed by sandbags and taking fire immediately.

Stevens and Smith didn't make it out, the officials said. The agent, suffering severely from smoke inhalation, went in and out of the building several times to look for them — in vain. He then climbed a ladder to the roof of the building and collapsed, radioing the other agents in a barely audible voice to alert them to the situation there.

The other four agents were able to then reunite, taking an armored vehicle to Stevens' building. They reached the collapsed agent and tried to set up a perimeter, taking turns going into the building and searching on hands and knees for the missing Americans. Smith was pulled out, dead. Stevens could not be found.

A six-member quick reaction security team arrived on the scene from its compound across town, the officials said. About 60 Libyan militiamen accompanied the team, and it again tried to secure a perimeter around Stevens' building, taking turns searching inside. Taking fire, the Libyan forces determined they couldn't hold the perimeter. An evacuation plan was quickly put in place to retreat to the reaction force's compound.

The evacuation proved anything but easy. Agents piled into an armored vehicle with Smith's body, facing immediate fire as they left through the main gate. Crowds and groups of men blocked two different routes to the security compound, so the Americans looked for an alternate way through heavy traffic at a speed of about 15 mph, so they wouldn't attract attention.

On a narrow street, according to officials, the agents reached a group of men who signaled for them to enter a compound. They sensed an ambush and sped away, but not before taking heavy fire from AK-47 machine guns at a distance of only 2 feet and hand grenades thrown against and under the car. Two tires were blown out.

They raced past another crowd of men and onto a main street, crossing a grassy median into opposing traffic. The agents then drove against oncoming traffic, eventually reaching their compound.

Once there they had to endure several more hours of intermittent gunfire and rocket-propelled grenades fired their way.

A team of reinforcements from the U.S. Embassy in Tripoli arrived on a chartered aircraft at the Benghazi airport and reached the security compound.

But the Americans could do little when their main building was hit by mortar fire around 4 a.m. Two security personnel were killed, and one agent who had been involved in the earlier fighting was severely wounded.

The men decided to leave the city. They spent the next hours securing the annex and moving a large convoy of vehicles to the airport.

They flew out on two planes.