The Libyan transitional government was informed about this US operation in advance, a senior US official said.
Al-Liby's capture was the latest blow to Al Qaeda organization in northern Africa.
Since the overthrow of Colonel Gaddafi, Tripoli has become a safe haven for jihadi militants seeking to avoid detection.
In Somalia, the Navy SEAL team commandos emerged before sunrise from the Indian Ocean and exchanged gunfire with Al Shabab militants at the home of a senior leader in a seaside villa in the town of Baraawe.
The raid was planned more than a week ago after the Nairobi shopping mall massacre by Al Shabab terrorists.
The SEAL team was forced to withdraw after the hourlong firefight with Al Shabab terrorists holed up inside the villa.
Four year ago, American troops had raided and killed Saleh Ali Saleh Babhan, an Qaeda mastermind, near the same coastal town of Baraawe, located south of Mogadishu. This town is considered a gathering point for Al Shabab foreign fighters.