A Libyan militant suspected in the deadly attack on Americans in Benghazi has been captured and is in American custody, the Pentagon said Tuesday.

The United States told the U.N. Security Council that the suspected ringleader of a deadly 2012 attack on its diplomatic compound in Benghazi planned to target more Americans and that justified his capture.

In a letter obtained by Reuters on Wednesday, U.S. Ambassador to the United Nations, Samantha Power, notified the council of the capture on Sunday of Ahmed Abu Khatallah by U.S. special forces in Libya after an investigation identified him as a key figure in the 2012 attack that killed four Americans.

"The investigation also determined that he continued to plan further armed attacks against U.S. persons," Power wrote in the letter dated Tuesday.

"The measures we have taken to capture Abu Khatallah in Libya were therefore necessary to prevent such armed attacks, and were taken in accordance with the United States' inherent right of self-defense," she wrote.

Power said the United States was reporting the capture of Khatallah to the Security Council under Article 51 of the U.N. Charter, which requires that the body be notified immediately of measures taken by states in self-defense against armed attack.

The brief letter also said Khatallah would be presented to U.S. Federal Court for criminal prosecution.

The attack on the U.S. compound killed four Americans, including the U.S. ambassador, and ignited a political firestorm in Washington.

President Barack Obama said in a statement he had authorized the operation in Libya on Sunday in which special forces, along with law enforcement personnel, captured Ahmed Abu Khatallah on the outskirts of Benghazi.

Special forces had shown "incredible courage" in the operation that captured Khatallah, he added.

The United States notified the Libyan government about the operation to capture Khatallah, the Pentagon said on Tuesday, but declined to say whether Libya was notified prior to the capture. A U.S. official, speaking on condition of anonymity, said Libya was not notified before the raid.

Obama says that Khatallah is being transported to the United States aboard a ship. He could face the death penalty if convicted.

"He is now being transported back to the United States. I say that first of all because we continue to think about and pray for the families of those who were killed during that terrible attack," Obama said during an event in Pennsylvania.

"But more importantly ... for us to send a message to the world that when Americans are attacked, no matter how long it takes, we will find those responsible and we will bring them to justice."

Khatallah was being held aboard the USS New York, an amphibious transport dock, a U.S. official said, speaking on condition of anonymity.

He was grabbed on the outskirts of Benghazi in an operation carried out by U.S. special operations forces, including some members of the Army's Delta Force, another U.S. official said.

Rear Admiral John Kirby, the Pentagon press secretary, said there were no civilian casualties in the operation and all U.S. personnel involved had safely left Libya. The Pentagon declined to discuss further details of the operation and it was not immediately clear whether there were non-civilian casualties.

Until his capture, Khatallah continued to live freely in Libya while giving taunting interviews to major media outlets as recently as six months ago. The State Department designated Khatallah as a terrorist in January, describing him as a leader of Ansar al Sharia, a Libyan militant group that has been described as having links to Al Qaeda.

Benghazi, the hub of Libya’s east, has been beset by turmoil in recent months, and the chaos deepened last month when a rogue ex-general based in the city launched a self-declared war on Islamist armed groups, resulting in more than 100 deaths.

"FULL WEIGHT" OF THE JUSTICE SYSTEM

A U.S. official said Khatallah would be charged and prosecuted through the U.S. court system and would not be sent to the prison for suspected al Qaeda militants in Guantanamo, Cuba.