WASHINGTON (AP) — Competing portraits of the accused mastermind of the 2012 attacks on U.S. compounds in Benghazi, Libya, emerged Thursday as prosecutors and a defense attorney attempted to sway jurors before they began deliberating his fate.

Prosecutors painted Ahmed Abu Khattala as a terrorist whose hatred for U.S. freedoms fueled the ambush that killed four Americans, including Ambassador Chris Stevens. A defense attorney described him as a deeply religious man who simply ventured to the complex because he thought there was a protest and wanted to see what was happening.

"They want you to hate him. That's what this case has been about," public defender Michelle Peterson told jurors. "They want you to hate him enough to disregard holes in their evidence."

Jurors will start deliberating Monday. Khattala faces life in prison if convicted of the Sept. 11, 2012, rampage, which prosecutors say aimed at killing American personnel and plundering maps, documents and other property from the post.

The case became instant political fodder, with Republicans accusing President Barack Obama's administration of intentionally misleading the public and stonewalling congressional investigators, though officials denied any wrongdoing. Some in Congress were particularly critical of then-Secretary of State Hillary Clinton's handling of the conflict.

But the testimony in the trial, which opened Oct. 2, has been mostly free of political intrigue. The trial was one of the most significant terrorism prosecutions in recent years in a U.S. civilian court, even though the Trump administration had argued such suspects are better sent to the military prison at Guantanamo Bay, Cuba. A conviction in Khattala's case would be another setback for that ideology, which President Donald Trump and his attorney general already seem to be abandoning, as newly captured terror suspects — including a second man charged in the Benghazi attacks — are instead brought to federal court.

Stevens was killed in the first attack at the U.S. mission, along with Sean Patrick Smith, a State Department information management officer. Nearly eight hours later at a CIA complex nearby, two more Americans, contract security officers Tyrone Woods and Glen Doherty, died in a mortar attack.

Khattala, suspicious that Americans were operating a spy base, planned the ambush for at least a year and served as the "on-scene commander" for a band of armed men who stormed the complex, Assistant U.S. Attorney Michael C. DiLorenzo told jurors.

"He viewed the United States, which promoted freedom, as the cause of all the world's problems," DiLorenzo said. "He was there to kill Americans, and that is exactly what he and his men did."

Peterson sought to depict her client as a "Libyan patriot" who fought on America's side in the war against Libyan leader Moammar Gadhafi. He is a deeply religious man who believes in conservative sharia law as outlined in the Quran, which "is not the same thing as terrorism," she said.

FBI agents frequently misidentified Khattala in surveillance footage, she added, noting gaps in the video.

She cast doubt on prosecution witnesses, in particular an informant who was paid $7 million to befriend Khattala, help the government gather information on him and arrange his capture. The informant helped link Khattala to the attackers, and prosecutors said they are seen on grainy surveillance video milling about the complex with guns.

Among other people whom the informant identified was Mustafa al-Imam, who was captured last month and awaits trial in the same federal courthouse in Washington.