US troops captured a key suspect linked to the deadly 2012 attack on an American consulate in Benghazi in a secret operation in Libya over the weekend.

Special operations forces, working with FBI agents, carried out the raid and the suspect is en route to the United States, where he will face criminal charges.

There were no civilian casualties in Sunday's raid and the suspect was in US custody at a "secure location outside of Libya," Pentagon spokesman Rear Admiral John Kirby said.

US Secretary of State John Kerry said: "He will face a court of law and be held accountable for his actions."

The White House, which has faced intense criticism over its handling of the Benghazi assault on 11 September 2012 and its aftermath, hailed the operation as a crucial step on the road to justice

"We have made it clear, since that cowardly attack on our facilities, that we would go at any length to find, apprehend, bring to judgment, those who perpetrated it," spokesman Jay Carney said.

"The capture of Ahmed Abu Khatallah is not the end of that effort but it marks an important milestone."

Mr Kirby said all US troops and personnel taking part in the operation have "safely departed Libya."

US authorities had filed charges against Mr Khatallah and others over the 2012 Benghazi attacks, which killed four Americans, including the US ambassador to Libya, Christopher Stevens.

The State Department identified Mr Khattalah as a senior leader of Ansar al-Sharia, a Libyan Islamist group it brands a "terrorist" organization responsible for many attacks and assassinations.

After previous similar raids, the military has held suspects aboard naval ships before flying them to the United States to face legal charges.

US Senator Lindsey Graham indicated the suspect was being held on a ship and blasted the administration for not taking him to the US-run prison at Guantanamo Bay, Cuba.

He said in a tweet that he was "very pleased our Special Forces" have captured Mr Khattalah but he criticised President Barack Obama's administration for holding the suspect on a naval ship.

"Holding Khattalah on a ship shows the haphazard approach which comes from not having rational detention & interrogation policies," the senator wrote.

The hours-long assault on US facilities in Benghazi, which included a CIA outpost, shocked the US and became a highly-charged political issue.

Republicans have alleged that the White House failed to respond decisively and then tried to hide some facts in the episode.

The Obama administration has accused critics of politicising a tragic event and says it has divulged all the details of the case.