Egyptian President Abdel Fattah al-Sisi has warned Western powers Libya could spiral out of control if they try to intervene militarily in the conflict-wracked North African state.

Speaking in a rare interview, the military-backed ruler of one of the region's biggest powers said the West and its allies should instead concentrate on strengthening the army of Libya's internationally recognised government and let it do the job of stabilising the country.

The army is commanded by Khalif Haftar, an officially retired general who spent 20 years in exile in the United States and has been described as a potential 'Libyan Sisi' because of his fierce opposition to Islamist groups.

"If we provide arms and support to the national Libyan army it can do the job better than anyone else, better than any outside intervention which would risk dragging us into a situation that risks getting out of hand and triggering uncontrollable developments," Sisi told Italy's La Repubblica in an interview published Thursday.

Sisi said history had "spoken clearly" about the difficulty of trying to impose peace from outside.

"Two lessons must be kept in mind: that of Afghanistan and that of Somalia," he said. "Those were long foreign interventions (that started) more than 30 years ago and what progress has been made since?

"The results are there for everyone to see."

Sisi also suggested that European governments were underestimating the scale of Islamist influence in Libya.

"Europeans look at Libya as if IS (the Islamic State group) was the only threat," he said.

"That is a serious mistake. We have to be aware that we are up against different acronyms with the same ideology: what do we say about al-Qaeda networks like Ansar al-Islam, like Somalia's Shebab or Boko Haram in Africa."

Italy has said it is prepared to lead a UN-backed international peace force into Libya if and when the country proves capable of establishing a national unity government with the authority to ask for outside security help.

Sisi said such a mission would be fraught with difficulty and it would be better to concentrate on building up Haftar's forces.

The army commander was involved in the 1969 military coup which brought Moamer Kadhafi to power in Libya. He later fell out with the dictator and was forced into exile, returning in 2011 to take part in the uprising that toppled Kadhafi.

He has long had close relations with the Egyptian military having served alongside their forces in the Sinai desert as a young Libyan officer during the 1973 Arab-Israeli war.