A former UK ambassador to Libya has said the UK and other EU states could send in troops if the authorities request reinforcements.

Sir Richard Dalton insisted there was a case for countries "with the greatest stake" and with the "most to lose" to consider military intervention should the country descend into "Somalia-type warlordism".

Speaking on BBC Radio 4's Today programme, he added: "The case is that these states should consider whether to prompt the Libyan authorities to request some form of military intervention to bolster a negotiated settlement.

"Now that is a very big ask. First of all because the record of intervention has not been successful. But mostly because there is no sign yet that the attempts led by the UN and by other countries to get a mediation between the warring groups is going to be successful.

"So what I'm suggesting is that we should do the preparation now in case that mediation should be successful and Libyan leaders generally request some form of reinforcement for their own embryonic forces."

Asked whether this could mean boots on the ground, he replied: "Possibly."

But he went on: "Unfortunately there is considerable weariness about helping Libya because although there is a road map, there is an agreement...as to what the foreign community should be doing and what the Libyans themselves should be doing, Libyan central authority has virtually collapsed and it has become impossible for them to carry out their side of the bargain.

"What I believe is the European countries will be very reluctant to get involved unless the Libyans pull themselves together."

Since the overthrow of Colonel Muammar Gaddafi in 2011 by rebels supported by British and French air strikes, the north African country has descended into a state of lawlessness as rival militias vie for power and wealth.

In the past few days, sporadic fighting has spread northwards in the capital Tripoli to the area where the British embassy is situated.

Sir Richard, who was sent as ambassador in 1999, rejected the idea that the current situation was an inevitable consequence of the overthrow and said it had only begun to seriously deteriorate in the summer of 2013.

He said: "We should have done what we did. There was a humanitarian crisis which we had the means to address and it was done effectively.

"What has happened was not inevitable. It's due to the failure of the Libya's own leaders to take the opportunity offered to them.

"Should more support have been given during this very difficult transition, well we can argue about that.

"But the fact is that the Libyans themselves have always set their faces against more foreign intervention or more foreign armies on the ground trampling over their territory.

"In fact it was not inevitable. It began to deteriorate really seriously in the summer of 2013 and debate should be on not how we got here but on what to do now."