Two French nationals suspected of wanting to join Islamic State training camps in Libya before heading to Syria were arrested in Tunisia in mid-November, according to an official at the Paris prosecutor's office.

It is the first case made public of potential French Islamic State recruits travelling to Libya instead of Syria, where hundreds of French citizens have already joined the ranks of the hardline group.

According to the official, the two men, aged 19 and 20, were arrested near Tunisia's southern border with Libya. They were handed over to French authorities on November 13, the day of the Paris attacks that killed 130 people and claimed by Islamic State (IS).

North African oil producer Libya has slipped deeper into chaos with two rival governments, each backed by a multitude of armed factions, procrastinating over signing a previously negotiated agreement for a unity government.

This has allowed IS jihadists to take control of the city of Sirte and tighten their grip on central Libya, carrying out summary executions, beheadings and amputations, the United Nations said this month.