The Libyan government on Thursday appealed for foreign help to fight terrorism, in its first acknowledgement that "terrorist groups" were behind dozens of attacks against security services and Westerners.