Max Goeldi's initial 16-month sentence was reduced to four months on appeal
One of two Swiss businessmen who sought shelter at the Swiss embassy in Libya amid a diplomatic row is being transferred to jail, an official says.
The man, Max Goeldi, was driven from the embassy in handcuffs. He faces four months in jail on immigration offences.
The second man, Rachid Hamdani, who has been cleared, was to leave the country.
The case against the two is widely thought to be retaliation for the arrest of one of Libyan leader Muammar Gaddafi's sons in Geneva.
Last week Libya stopped issuing visas to citizens from many European nations, prompting condemnation from the European Commission.
'Storm the embassy'
Goeldi faces a four-month prison sentence after being convicted of violating immigration rules. His initial 16-month sentence was reduced on appeal.
Libya set a deadline of midday on Monday for Goeldi's handover, and authorities stepped up their presence outside the embassy as the deadline approached, the BBC's Rana Jawad reports from Tripoli.
Austrian Foreign Minister Michael Spindelegger was cited by Reuters news agency as saying the Libyan police had threatened to storm the embassy if the deadline was not met.
"Last night there were many intense phone calls," he was quoted as saying at an EU meeting in Brussels. "It was announced there was a deadline - either hand over the convicted Swiss citizens or the embassy would be stormed."
He said EU ambassadors had gone to the embassy to show solidarity before "the situation was calmed and an escalation avoided".
Libya's Deputy Secretary of Foreign Affairs, Khaled Kaim, said Goeldi was being taken to the Ain Zara jail near Tripoli, an "open prison" where he would be allowed visits.
Goeldi's lawyer told Swiss TV that his client would request a pardon.
Hannibal Gaddafi's arrest in 2008 sparked a diplomatic spat
Mr Hamdani left the embassy hours earlier.
A lawyer said the businessman, who holds dual Swiss and Tunisian nationality, was heading by car to Tunisia.
Analysts suggest the charges against the two were brought in retaliation for the arrest of Mr 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, though the charges were later dropped.
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 that the Gaddafis were arrested, Libyan authorities detained Mr Hamdani, who works for a construction company, and Goeldi, the manager of an engineering firm.
The two were later released on bail before being convicted in absentia while sheltering in the Swiss embassy in Tripoli in December.
Libya's move to stop issuing visas came after Switzerland allegedly blacklisted 188 high-ranking Libyans, denying them entry permits.
It covers Switzerland but also 24 other nations in the Schengen zone, which includes European countries that have abolished mutual border controls.