Soldiers belonging to the Libyan military managed to free three Egyptian workers who were held by armed groups in the city of Benghazi, Egypt's state news agency reported on Sunday.
The agency cited Serag al-Tira, the spokesman of the Libyan army unit that freed the workers, as saying that the workers were hospitalised to check on their health before deporting them.
He added that the workers, who were held by "extremist" groups, were freed last night.
Amid intensified fighting in Libya, the capital Tripoli has fallen under the control of the Fajr Libya or Libya Dawn Islamist militia in August 2014.
Meanwhile, Egypt and the international community only recognise authorities based in the eastern Libyan city of Tobruk.
Egypt's air force launched airstrikes on militant targets in its restive neighbour on February 16 in response to a video that surfaced a day earlier and showed the beheading of 21 men, 20 of whom were Egyptian nationals.
They were kidnapped in late December 2014 and early January in two incidents in the Libyan city of Sirte.
Their killings are believed to have been carried out at the hands of men who belong to a Libyan division of the Islamic State fighters in Iraq and Syria.
The beheadings were part of a string of attacks that affected Egyptian citizens, who have often been caught up in the Libya crisis.
Since the airstrikes, many Egyptian nationals residing in Libya started evacuating the restive neighbour and returning to Egypt. Around 44,000 have returned so far, by land crossing and by air.
The Egyptian state has not provided an exact figure on the number of Egyptians residing in Libya but Foreign Ministry Spokesman Badr Abdelatty said last month that they were no less than half a million Egyptians there.