The foreign ministry says the two Swiss businessmen abducted by the Libyan government in September have been returned to the Swiss embassy in Tripoli.
The Swiss citizens "are as well as can be expected under the circumstances", the ministry said in a statement.
The men were returned to the embassy without an explanation. It is unclear whether they will now be allowed to leave the country.
Foreign Minister Micheline Calmy-Rey welcomed their re-emergence, and said she had spoken by telephone to both men, who were "relieved" to have been returned to the embassy. They told her that they had not been mistreated.
Calmy-Rey declined to comment on whether their return to the embassy was the beginning of the end of the standoff with Libya.
ABB, the company that employs one of the hostages, said it was pleased with the news, but would only be satisfied when the hostages were back in Switzerland.
A foreign ministry spokesman said Switzerland did not meet any of the conditions set by Libya's deputy foreign minister, Khaled Kaim, on Sunday. Kaim told the NZZ am Sonntag newspaper that the Swiss government should condemn a comment made by a Swiss parliamentarian calling for the hostages to be freed by force.
The latest development comes only five days after Switzerland announced it was suspending a treaty aimed at normalising relations with Libya.
The government said on Wednesday that Libya's "systematic refusal" to cooperate with Switzerland in the case of the two Swiss prompted that decision. The men have been prevented from leaving the country for more than a year and were taken to an unknown location in Libya in September.
Switzerland described the abduction as a "violation of international law".
The men's plight became the most visible sign of a dispute that stems from the 2008 arrest in Geneva of a son of Moammar Gaddafi, Hannibal, and his pregnant wife. The couple had come to Switzerland for the birth of their child. Geneva police briefly took them into custody on accusations they had abused their domestic staff while staying at a luxury hotel in the city.
After two nights in detention, they were released on bail and left the country. The staff were later compensated, and the charges were dropped. The bail money was returned.
Swiss President Hans-Rudolf Merz went to Tripoli in August 2009 and apologised for the arrest, triggering heavy criticism at home for doing so. During his visit he signed an agreement with the Libyan prime minister to normalise relations. However, the deadline for its terms to be met elapsed on October 20.
When the government announced its tougher stance, it also said it would continue its "restrictive visa policy" towards Libyan nationals wishing to come to Switzerland. It is unclear whether Switzerland will still pursue those sanctions.
Visa restrictions would hit a number of well-to-do Libyans who frequently come to Geneva for medical check-ups in private clinics.
Switzerland belongs to Europe's Schengen area. Members have a right of consultation and veto over the allocation of Schengen visas, so that certain Libyans could be prevented from travelling anywhere in the Schengen area, which covers 25 countries in mainland Europe.
Hasni Abidi, director of the Study and Research Center for the Arab and Mediterranean World in Geneva, said the return of the two men to the Swiss embassy was the direct result of the Swiss government's change in tone.
Abidi said the Libyans had realised that it was counter productive to keep the men in a secret place.
He also said Amnesty International's efforts to mobilise public support for the freeing of the Swiss nationals had also begun to bear fruit.
"The Libyan government is unpredictable," Abidi added when asked whether the men would be allowed to leave the north African state soon.
swissinfo.ch and agencies
July, 2008: Hannibal Gaddafi and his wife Aline are arrested at a Geneva hotel on July 15 after reports that they have mistreated two servants. After two nights in detention, the couple are charged with inflicting physical injuries against the servants. The Gaddafis are released on bail and leave Switzerland.
July: Two Swiss nationals are arrested in Libya. Swiss businesses are forced to close their offices and the number of Swiss flights to Tripoli is cut. Bern sends a delegation to Libya.
January 2009: Talks are held in Davos with Seif al-Islam Gaddafi, one of the Libyan ruler's sons. A diplomatic delegation travels to Tripoli.
April: Hannibal and his wife, along with the Libyan state, file a civil lawsuit against the Geneva authorities in a Geneva court.
May: Foreign Minister Micheline Calmy-Rey visits Libya, reporting "significant progress".
June: Libya withdraws most of its assets from Swiss bank accounts.
August: Merz, who meets the Libyan prime minister but not Gaddafi, apologises in Tripoli for the arrest. Swiss appoint arbitrator for international tribunal.
September: Libya does not let the two Swiss nationals leave the country, breaking a promise made to Merz that they would be free to return to Switzerland before September 1. Libya names its representative for the tribunal. Gaddafi and Merz meet on the sidelines of the UN General Assembly in New York. The two nationals disappear after undergoing a medical check-up in Tripoli.
October: A Swiss delegation returns empty-handed from Tripoli. A 60-day limit for normalising relations between Switzerland and Libya passes with no sign of the two Swiss hostages held by Tripoli.
November: On November 5, Swiss ministers suspend treaty seeking to normalise relations with Tripoli and say they will pursue visa restrictions for Libyans. A few days later, the two businessmen are returned to Swiss embassy in Tripoli.