Libya has condemned th arrest by US special forces of a man on its soil suspected of masterminding a deadly Islamist militant attack on the US consulate in Benghazi, describing the detention as a violation of Libyan sovereignty.

In the first official reaction from Tripoli, Justice Minister Saleh al-Marghani said the suspect, Ahmed Abu Khatallah, should be returned to Libya and tried there.

"We had no prior notification. We did not to expect the US to upset our political scene," Marghani told a news conference.

He said Khatalah had been wanted by Libyan authorities for questioning but a lack of security had prevented this.

Said al Saoud, spokesman for the foreign ministry, said: "This attack on Libya sovereignty happened at a time when Benghazi is suffering from many problems."

US President Barack Obama said he authorised the operation in Libya on Sunday in which US commandos snatched Khatallah on Benghazi's outskirts, and that he was being transported to the United States for prosecution.

The September 2012 assault on the US consulate in Benghazi, since closed, killed four Americans including the US ambassador to Libya, Chris Stevens.

The North African oil producer is struggling with chronic lawlessness, with the government and parliament in Tripoli unable to control militias, tribes and Islamists who helped oust Muammar Gaddafi in 2011 but are now defying state authority.

Sign up to our free newsletters

Get the best updates straight to your inbox:
Please select at least one mailing list.

You can unsubscribe at any time by clicking the link in the footer of our emails. We use Mailchimp as our marketing platform. By subscribing, you acknowledge that your information will be transferred to Mailchimp for processing.