If it looks like a stork, walks like a stork … it's probably a foreign spy. This, at least, was the conclusion of an Egyptian fisherman who took patriotic exception to a migratory bird near his home in Qena, southern Egypt.

Spotting an unlikely metallic device attached to the stork and suspecting it contained a camera – or worse – the fisherman concluded the stork was a spy acting on behalf of foreign powers.

Dutifully apprehending the bird with a citizen's arrest, the man brought the stork – initially feared to be a swan – to a nearby police station. Local veterinary experts were summoned. An inspection took place. To the relief of all, the stork turned out to be bearing nothing but a wildlife tracker, apparently fixed to its feathers by French scientists researching birds' migratory paths. The device was no longer working.

The stork is not the first fowl to have fallen foul of Egyptian authorities. In January, state media reported that a stricken carrier pigeon had been sent to Egypt's criminal investigation department after being found with a suspicious microfilm.

But the stork's treatment comes amid a wider rise in xenophobia in Egypt this summer. Since the army forced out ex-president Mohamed Morsi in a widely backed move on 3 July, the country has been consumed in a wave of pro-military nationalism.

One side-effect has been the blaming of the country's ills on foreigners – from American diplomats, to Syrian refugees and western journalists. Egypt's main state newspaper last week published on its front page fictitious claims that the outgoing US ambassador had plotted with Morsi's Muslim Brotherhood to destabilise the country.

As for the stork, it was last reported to still be behind bars. Though its innocence had been verified, police were still waiting for clearance from local prosecutors.