Government witnesses in the trial of Ahmed Abu Khattala testified Tuesday in graphic detail about the bloody attacks on U.S. compounds in Benghazi, Libya, while defense attorneys worked to raise doubt that the defendant masterminded the 2012 strikes that killed four Americans.

The trial entered its second day with U.S. government prosecutors questioning diplomatic security agent Scott Wickland, who tried unsuccessfully to save ambassador Chris Stevens and Sean Patrick Smith, a State Department information management officer, from a burning U.S. diplomatic outpost. Nearly eight hours later, two more Americans — contract security officers Tyrone Woods and Glen Doherty — died in a mortar attack on a CIA complex nearby.

Defense lawyers claim Abu Khattala was not the ringleader and went to the attack site only to see what was happening. Attorney Michelle Peterson has claimed that the defense will produce evidence that the attacks were the result of an inside job.

She cross-examined Wickland about how he had confronted members of a Libyan security force because he thought they were lax in defending the compound.

"I remember looking at them dead in the eye and said: 'Where were you?'" Wickland said he told them.

After gunfire resumed, the disorganized local force "just started running," he said.

Abu Khattala sat quietly in U.S. District Court, listening through headphones to an Arabic translation. Occasionally, he swiveled in his chair at the defense table, which was covered in legal documents. He has pleaded not guilty to his charges, including murder of an internationally protected person, providing material support to terrorists and destroying U.S. property while causing death.

During her cross-examination, Peterson posed questions suggesting that other local Libyans — perhaps former loyalists to former Libyan leader Moammar Gadhafi or turncoats working at the compound — were to blame for the attacks.

The defense has called Abu Khattala a "Libyan patriot" who fought on America's side in the war against Gadhafi.

"You knew there were Gadhafi loyalists who still remained?" she asked Wickland.

"Yes," he replied.

Wickland, a witness for the prosecution, also testified that the armed local Libyan force that scattered might have been disorganized, but did not show hostility toward the Americans. Two of the members of that force were so disturbed by what had happened that they had "tears in their eyes," he said.

Wickland also testified that another local unarmed force working with the Americans did their job in alerting them of the pending strike. He said that as they were trained to do, members of that group screamed the words "attack, attack, attack" into their radios just before the compound was hit.

On Monday, Wickland offered an emotional account of how he tried to save Stevens and Smith. He retook the stand Tuesday morning and testified about how he and other Americans jumped in an armored vehicle to seek safety at the CIA annex nearby. He said that as he drove, the vehicle was attacked by groups of hostile Libyans.

"I just floored it. They ... started shooting the car, pelting the car hundreds of times," he said, adding that he later plowed through parked vehicles and a wooden roadblock to get to the annex.

Later, the CIA annex was hit with mortars. He recalled being treated in a medical room for his injuries, drinking water and eating fruit for energy. He had inhaled a large amount of smoke and was having trouble breathing, but there was no oxygen to help him. He said he heard a loud explosion and that David Ubben, another diplomatic security agent, was brought down to the medical room.

"The mortar basically had ripped off his leg," Wickland said. "He had shrapnel in his face, and it had ripped off part of his arm. It's hard to see your friend like that."

Ubben, who survived and had several surgeries to save his leg, took the stand next.

Ubben said he too tried to find Stevens, who was still inside the burning diplomatic compound. That effort failed and his body later was recovered by local Libyans, who took him to a local hospital where he was pronounced dead.

Ubben said he got into the compound through a window and tried to feel his way into the building, but he encountered thick, toxic smoke that repeatedly forced him to go back outside to gulp fresh air.

On one foray into the building, Ubben said he was crawling on his hands and knees and ran into Smith's lifeless body, which he pulled from the building. With smoke burning their eyes and noses, he and another agent repeatedly went back in to look for Stevens. They tried using gas masks, but the filters clogged, preventing them from getting oxygen.

After local Libyans working with the Americans warned them of another attack, they evacuated.

"At that point we decided to call off the search," Ubben said. "For me personally, I didn't want to. I didn't like the idea of not recovering at least his body. ... The chance of finding him alive were slim at this point. Nonetheless, I wanted to recover his body. To me, it felt like a failure to not be able to do that."