Italian authorities arrested 40 Egyptian nationals this week on charges of attempting to enter the country illegally.
The group of Egyptians, which included three minors, was found on a boat off the Sicilian coast, Egypt's Assistant Minister for Consular Affairs, Immigration, Egyptian Expatriates and Refugees Mohamed Abd al-Hakam said in a statement on Wednesday.
He went on to say that, in light of the excellent relations between Egypt and Italy, the Italian authorities had decided to release the would-be migrants and allowed them to return to their homeland.
All of them arrived safely in Egypt on Tuesday, Abd al-Hakam added.
Last month, 94 Egyptian nationals attempting to emigrate to Italy without legal documentation were rescued from drowning off the coast of the Greek island of Crete.
Alexandria and its surrounding coastline has increasingly become the site of departure for irregular migrants en route to Europe.