0439 GMT November 20, 2019
Officials in Libya and Rome said on Friday that Gino Pollicardo, 55, and Filippo Calcagno, 65, were freed in a raid on Daesh hideouts in the city of Sabratha near the capital.
"Two Italian hostages were released... in Sabratha after an operation targeting several houses after information reached security forces that Daesh elements were there," Sabratha mayor Hussein al-Dawadi said.
In a video posted on the municipality's Facebook page, the pair were seen wearing tracksuits, with long beards and disheveled hair.
"We are free and are relatively well physically but are psychologically exhausted. We urgently need to return to Italy," said the hostages.
The Italian foreign ministry confirmed the news, saying the two Italians were "no longer in the hands of their captors."
"They are now under the protection of the Sabratha military council and are in good health," it added.
The freed hostages were among four employees of Italian construction company, Bonatti, who were kidnapped in July 2015 in the Mellitah region west of Tripoli.
Fausto Piano and Salvatore Failla were probably killed in clashes between Daesh militants and local militiamen near Sabratha, according to Italy's foreign ministry.
Sabratha has been the scene of intense fighting between local militias and Daesh militants since a US attack last month on a Daesh training camp on the outskirts of the city killed 50 people.
Daesh subsequently seized the center of the city, only to be pushed back to its outskirts last week.
Libya is now divided between two rivaling governments, the General National Congress (GNC) run by the rebels in the capital, Tripoli, and the internationally-recognized administration, based in the northeastern city of Tobruk.
The rival administrations have been called to sign up to a UN-brokered national unity government to help restore stability.
Taking advantage of the political chaos, Daesh Takfiri group took control of the northern port city of Sirte in June 2015, almost four months after it announced its presence in the city, and made it the first city to be controlled by the militant group outside of Iraq and Syria.
Since then, the group has been boosting its presence in the violence-wracked country, particularly after the Iraqi and Syrian armies' advances against the militants.