Egyptian prosecutors detained a Brazilian tourist on Tuesday after he posted a video on social media in which he swore at a souvenir seller in Giza.
The incident took place at a papyrus shop the accused man’s tour group was visiting.
When the saleswoman showed the man items for sale, he used sexual profanity in Portuguese, filming the interaction.
The video and subsequent legal action by Egypt's security forces quickly became the subject of interest on social media.
The suspect, identified as Brazilian doctor Victor Sorrentino, has about a million followers on Instagram and regularly makes posts about his life and work.
But his followers were not impressed with the video and Dr Sorrentino deleted it, travelling back to the shop the next day to apologise to the victim.
He filmed the apology and uploaded it to his social media pages, but it failed to ease his followers’ outrage.
Dr Sorrentino's Instagram account was later made private.
The saleswoman was very upset when she was told by security forces what the man had said to her and insisted on pressing charges despite the man's apology, prosecutors said.
The man will be detained for four days while police investigate the incident, which occurred on May 24.
Prosecution recruited a Portuguese translator, who confirmed the man’s language towards the woman was of a sexual nature, “thus violating the family principles and values of Egyptian society, and violating the sanctity of the victim’s private life", it said.
The arrest surprised many Egyptians, who thought the man would walk free because he is a tourist.
Others said the government was not always lenient with tourists, as shown by legal action against those who illegally climb the pyramids.
"I was surprised when the man was arrested, to be honest. He is a tourist," Zeina Amr, the founder of "Catcalls of Cairo", told The National.
That the victim did not report the incident to the police prompted some to question the motives behind the tourist's detention, with some suggesting it was designed to boost the country's image.
“The government is keen on making Egypt look like a country that protects women,” Ms Amr said. “I would be very surprised if he will be significantly reprimanded.”