David Cameron pledged help to bolster the police and army in Libya as he made an unannounced visit to the country.
The Prime Minister said Britain was ready to provide training and advice amid growing concern about the security situation in the region.
On a walkabout in the capital's famous Martyrs' Square, Mr Cameron was greeted by friendly locals.
More top news
In Edinburgh tonight you can hear it and feel it. The buzz, the banter of the day and the thrilling sense something big is coming tomorrow.
There is nervousness, anxiety and on the streets of Edinburgh fuelled by an atmosphere unlike anything seen before in recent UK politics.
How will the vote go? What would a Yes victory do to England? Policital Editor Tom Bradby answers readers' questions on the referendum.