CAIRO — The Egyptian authorities expelled a French journalist this week, an unusually harsh step that highlighted the crackdown on press freedoms by the government of President Abdel Fattah el-Sisi, Egyptian and French officials said on Wednesday.

The journalist, Rémy Pigaglio, had worked in Egypt for almost two years and had residency permits and media accreditation that allowed him to do so legally, according to an article in the French newspaper La Croix, one of several outlets that Mr. Pigaglio contributed to. Egyptian security agents detained him at the Cairo airport on Monday as he was returning to Egypt from a 10-day vacation. He was held for 30 hours before security agents deported him without giving a reason, La Croix reported.

Egypt’s authorities have arrested and prosecuted scores of Egyptian journalists over the last two years, but they have generally been reluctant to take action against foreign journalists, fearing unwanted international scrutiny. It is even more unusual for the government, with its emphasis on procedural rules, to take action against international correspondents who have been accredited to work in Egypt.

Mr. Pigaglio’s expulsion threatened to strain relations between France and Egypt at a time when the two countries are cooperating to locate the debris of EgyptAir Flight 804, which plunged into the Mediterranean last week during a flight from Paris to Cairo. Investigators are searching for the airplane’s cockpit data and voice recorders — the black boxes — to explain the flight’s descent soon after it crossed into Egyptian airspace.