American special operations forces and FBI agents have captured a militant who allegedly was involved in the deadly attack on a U.S. diplomatic compound and CIA annex in Benghazi, Libya, two U.S. officials confirmed to Fox News on Monday.

Officials identified the suspect as Mustafa al-Imam. The capture took place Sunday at an unknown location in Libya.

The attack, on September 11, 2012, killed four Americans, including Ambassador Chris Stevens.

Al-Imam is being transported back to Washington where he will be charged in federal court, a U.S. official told Fox News. The Department of Justice has the lead on the prosecution.

He will not be going to Guantanamo Bay, officials told Fox News.

They said President Trump had approved the mission, which was carried out in coordination with Libya’s internationally recognized government.

"Our memory is deep and our reach is long, and we will not rest in our efforts to find and bring the perpetrators of the heinous attacks in Benghazi to justice," Trump said.

Secretary of State Rex Tillerson added that he'd spoken with the relatives of some of the Americans who died in Benghazi. Tillerson said the U.S. would "spare no effort" to ensure al-Imam is held accountable.

ALLEGED BENGHAZI MASTERMIND 'HATES AMERICA,' PROSECUTORS SAY

"I am grateful to the FBI, our partners in the intelligence community, and the Department of Defense who made this apprehension possible. The United States will continue to investigate and identify all those who were involved in the attack – and we will hold them accountable for their crimes," Attorney General Jeff Sessions reacted.

The Associated Press first reported the capture.

In addition to Stevens, the attack killed Sean Smith, an information management officer with the U.S. Foreign Service, and two former Navy SEALs, Glen Doherty and Tyrone S. Woods.

Earlier this month, the trial of Ahmed Abu Khattala began, the alleged mastermind of the 2012 attacks. It’s not clear if the suspect detailed by U.S. special operations forces is one of Khattala’s lieutenants.

Khatallah had been awaiting trail since 2014, when U.S. Army commandos and FBI agents captured him in Benghazi and put him on a Navy ship for detention in an American prison inside the United States.

Fox News' Jake Gibson and The Associated Press contributed to this report.