It sounds like another terrifying story of insurgent terrorism in the Middle East: on Tuesday, men dressed in the black garb of the Islamic State stormed through a mall in Iran, brandishing swords and guns, shouting “Allahu Akbar”. Shoppers reportedly fled the scene in fear.

It was reminiscent of the 2017 Tehran Isis attacks in which 17 people were killed. Except that the mall “attack” was actually a Punk’d style prank. The weapons were fake, and the presumed terrorists were actually actors. The whole incident was a piece of viral marketing for a film called Damascus Time about an Iranian father and son who are kidnapped by Isis. Some shoppers worked out what was going in and filmed the stunt on camera phones, but others can be heard screaming in terror.

The film’s director has since apologised – he said he had not been expecting one of the actors to arrive on horseback – but he is far from the first person to pull this kind of stunt. He was just following a tradition of prank terror plots begun by American teenagers.

There are so many videos of fake terrorist atrocities that you can watch entire compilations of unsuspecting members of the public, running, screaming and vomiting in fear. Most of them have been created by young western YouTube stars, many with millions of subscribers. They tend to involve someone dressed in stereotypical Arabic clothing, dropping a package at the feet of some strangers and running away. In one clip, people drinking on a boat all jump into the sea after a bag is thrown aboard. In another, laughing emojis flash on the screen when a man urinates on himself in fear after being surprised in a public restroom.

A “prank” video of terror attacks by Joey Salads has been viewed 3.3m times.

Joey Salads, a YouTuber with 2 million subscribers, has become notorious for these kinds of pranks. He tries to couch his videos as a “social experiments”, claiming to compare reactions between a man shouting “Allahu Akbar” when he drops a steel box on the floor with that of a man in western dress saying “praise Jesus”. Unsurprisingly, people are more distressed by the former prank, but the videos say less about Islamophobia than they do about the wild west of YouTube content, where pranksters seem to be able to get away with almost anything, with little interference from the site.

Last year, the British YouTuber Arya Mosallah, who had 650,000 subscribers, apologised after he made prank videos in which he approached strangers for a conversation and then threw liquid in their faces and ran away, leading them to believe they were victims of an acid attack, common in Britain at the time. Re-uploaded versions of the video can still be viewed on YouTube.

Some of these pranks seem too horrifying to be real, and in some cases they aren’t. Sam Pepper, a YouTuber with 2.3 million subscribers, apologised for faking a prank in which he appeared to kill someone’s best friend in front of him – admitting everyone in the video knew what was happening. In his apology, he said the pressure in the pranking community to make new videos led him to fake some of his content – a very odd version of peer pressure.

YouTube has said videos like Pepper’s do not violate its community guidelines and the site rarely removes prank videos. In most cases it’s more likely that the police will get involved than online moderators. Australian pranksters the Jalal Brothers were arrested by anti-terror police after they faked a series of terror attacks, including aiming a fake AK-47 at a small child. They later admitted that that video was entirely staged, but the police had not been not aware.

Despite the dangers and clear distress involved, new videos are emerging all the time. At this point, many people are more likely to be caught up in a faked YouTube prank than an actual terror attack.