Two Italians and a Canadian hostage have been released from captivity in Libya, after being held by an armed group for nearly two months.

Danilo Calonego, 66, and Bruno Cacace, 56, and Canadian Frank Poccia were in good health when they returned to Italy in the early hours of Saturday and had not been mistreated in captivity, government officials said.

Italian prime minister Matteo Renzi said: “Today is a moment of relief and joy that I would like to share with the families of our technicians.”

He also thanked Libyan authorities and their security forces.

The men were freed “due to the effective cooperation with local Libyan authorities,” according to a statement by the Italian government.

The technicians were working on a construction project at the airport of Ghat, a southern town close to the border with Algeria, when on 19 September, gunmen blocked their vehicle and took them hostage. It is not yet known which group they were aligned with, if any, though numerous armed outfits operate in the area.

Italy’s foreign ministry said the three arrived in Italy at around 3am local time (2am GMT) on Saturday. It was not clear when Mr Poccia might return to Canada. It was also unclear if any ransom had been paid to the kidnappers.

In pictures: Isis' Libyan stronghold of Sirte Show all 10 1 /10 In pictures: Isis' Libyan stronghold of Sirte In pictures: Isis' Libyan stronghold of Sirte Isis in Sirte Isis fighters parade through in Sirte in 2015 In pictures: Isis' Libyan stronghold of Sirte Isis in Sirte Islamic State (IS) group jihadists on the outskirts of Libya's western city of Sirte AFP/Getty In pictures: Isis' Libyan stronghold of Sirte Isis in Sirte A photo of a billboard in Sirte, Libya, listing seven rules for women's clothing, saying they must be loose-fitting and undecorated HRW/social media In pictures: Isis' Libyan stronghold of Sirte Isis in Sirte Isis militants process down a street in the coastal city of Sirte in Libya this week; the group has heralded Libya as its ‘strategic gateway’ to attack Europe AFP/Getty Images In pictures: Isis' Libyan stronghold of Sirte Isis in Sirte An Isis lecture on Sharia at the Ouagadougou complex in Sirte, Libya, in 2016. HRW/social media In pictures: Isis' Libyan stronghold of Sirte Isis in Sirte A sign reading "The city of Sirte, under the shadow of Sharia" as smoke rises in the background while forces aligned with Libya's new unity government advance on the eastern and southern outskirts of the Islamic State stronghold of Sirte on 9 June. Reuters In pictures: Isis' Libyan stronghold of Sirte Isis in Sirte Fighters loyal to Libya's GNA prepare to launch attacks against Isis as they continue their resistance on the outskirts of the western city of Sirte Getty In pictures: Isis' Libyan stronghold of Sirte Isis in Sirte Forces loyal to Libya's UN-backed unity government are seen during clashes with jihadists of the Islamic State (IS) on the western outskirts of Sirte on June 2, 2016. AFP/Getty Images In pictures: Isis' Libyan stronghold of Sirte Isis in Sirte Forces loyal to Libya's UN-backed unity government fire during clashes with Isis around 14 miles west of Sirte on June 2, 2016. AFP/Getty Images In pictures: Isis' Libyan stronghold of Sirte Isis in Libya

The intelligence services of all three countries involved took part in the recovery effort, according to Italian officials.

Libya has been wracked by lawlessness ever since the civil war began in 2011.

However, a number of Italian companies have maintained a presence in Libya, a former colony.

In July 2015, four Italians working for a construction company were kidnapped near an oil field operated by Italian fossil fuel giant ENI in the region of Mellitah, west of Tripoli.

Two of the hostages were killed more than six months into their ordeal, likely in clashes between Jihadis and local militiamen.