The motive for the attack, reportedly by a Tunisian naval guard, was under investigation. It came as the birthplace of the Arab Spring pro-democracy uprisings faces political and economic crises.