He entered the country with his Tunisian passport but they obviously knew that he was an Israeli as well. Glad he has been freed but he has been very lucky. He was freed quickly because of Lieberman's contacts in Europe who are close to the Libyan regime (Qaddafi's son).
One student killed, three wounded at Arizona campus during fight (a)
from the article: Israeli held in Libyan prison freed in secret deal