A Swiss businessman at the centre of a long-running diplomatic row between Libya and Switzerland has been released from jail in Tripoli, his lawyer says.
Max Goeldi was sentenced in February to four months in prison for violating Libyan immigration rules.
He and another Swiss businessman were held after the son of Libyan leader Muammar Gaddafi was arrested in Switzerland in 2008.
Libya also took other measures, widely regarded as retaliation for the arrest.
Correspondents say Mr Goeldi's release may allow a line to be drawn under the row.
"Goeldi has been freed," his lawyer, Salah Zahaf, said.
"He is in good condition. He is in a hotel in Tripoli right now and on Saturday we will start making arrangements for an exit visa so he can return home."
An unnamed prison official confirmed the release to AFP news agency.
Mr Goeldi was due to be released on 12 June.
The row began when Hannibal Gaddafi and his wife were arrested in Geneva in July 2008 accused of assaulting two servants while staying at a luxury hotel.
Although the charges were later dropped, Libya cancelled oil supplies, withdrew billions of dollars from Swiss banks, refused visas to Swiss citizens and recalled some of its diplomats.
Mr Goeldi, the manager of an engineering firm, was held along with Rachid Hamdani, who works for a construction company.
They were later released on bail and then convicted in absentia while sheltering in the Swiss embassy in Tripoli.
Mr Hamdani was later cleared but Mr Goeldi was taken to prison in February after a tense stand-off outside the Swiss embassy.