Mr Hamdani and Mr Goeldi have been unable to leave Libya since 2008
A court in Libya has dismissed a case against a Swiss businessman who was accused of illegal business activities, his lawyer has said.
Rachid Hamdani, who was also cleared last month of charges of overstaying his visa, is free to leave the country.
In 2008, Mr Hamdani and another Swiss businessman, Max Goeldi, were prevented from leaving amid a row between Switzerland and Libya.
On Saturday, Mr Goeldi was fined for operating without a business licence.
His lawyer, Salah Zahaf, said his client was satisfied with the $800 (£513) penalty, but that he was still deciding whether to appeal.
Mr Goeldi is already appealing against a conviction on charges of violating immigration rules in December, for which he was sentenced to 16 months in prison and fined $1,500. A ruling is due on Thursday.
Analysts suggest the charges against Mr Hamdani and Mr Goeldi were brought in retaliation for the arrest of Libyan leader Muammar Gaddafi's son Hannibal and his wife Aline Skaf in Geneva in July 2008.
They were accused of assaulting two servants while staying at a luxury hotel in the Swiss city, but the charges were later dropped.
Hannibal Gaddafi's arrest sparked a major diplomatic spat
Libya retaliated by cancelling oil supplies, withdrawing billions of dollars from Swiss banks, refusing visas to Swiss citizens and recalling some of its diplomats.
In the same month as the Gaddafis were arrested, the Libyan authorities detained Mr Hamdani, who works for a construction company, and Mr Goeldi, the manager of an engineering firm.
The two men were later released on bail and went to stay at the Swiss embassy in Tripoli, before being convicted in absentia for overstaying their visas.
Swiss media and officials have long described them as hostages, and there was widespread public outrage at their prison sentences.
However, correspondents say the subsequent rulings may signal that the diplomatic dispute is finally being resolved.
Tripoli has repeatedly denied suggestions the legal action against the businessmen is linked to the wrangling between the two states.
Last year, Switzerland apologised for the manner of Hannibal Gaddafi's arrest and opened itself to possible compensation claims as part of an agreement, but later suspended the deal after its attempts to secure the release of Mr Hamdani and Mr Goeldi failed.