Libyan government has condemned a United States operation to arrest a man suspected of masterminding a deadly raid on the US consulate in Benghazi, describing the detention as an attack on their country's sovereignty.

The country's Justice Minister Saleh al-Marghani said the suspect Ahmed Abu Khatallah should be returned to Libya and tried there.

Al-Marghani remarks came on Wednesday after the US President Barack Obama announced capture of Khatallah in what he said was a secret raid over the weekend in Libya.

The US suspects Khatallah is linked to the deadly 2012 attack on an American consulate in Benghazi that killed the US ambassador to Libya, Christopher Stevens, and three other Americans.

"Since the deadly attacks on our facilities in Benghazi, I have made it a priority to find and bring to justice those responsible for the deaths of four brave Americans," Obama said on Tuesday while announcing the capture of Abu Khatallah.

The US said that the Libyan government has been informed of the operation, but declined to say whether Libya was notified prior to the capture.

The Libyan government on Wednesday, however, denied it had prior knowledge of the US capture of Khatallah.

In a statement read on television, the interim government condemned his arrest.

"The government stresses its right to try Abu Khattala on its territories and according to its laws," the statement said.

Source: Agencies