It’s a sunny day in Miami Beach as pretty young men and women dance by a pool. A disc jockey stands in a poolside booth, playing music.

Nearby, an FBI informant named Nura and another man, Malik, train their eyes on a drink cart being pushed through the crowd. Malik believes there’s a bomb on the cart. All he has to do is dial the number on the phone Nura is holding.

“The bomb will only take out the men, right?” Malik asks, suddenly unsure if he wants to move forward in the attack.

“What?” Nura replies, baffled by the question.

“The men are the soldiers. The women are not the soldiers. Only the men.”

“Yes, yes, of course. Just the men,” Nura says, trying to keep the FBI terrorism sting on track. “You see the wheel guards? They shape the blast. Only the men die in the blast.”

“A hundred percent no lady jihad?” Malik asks.

“Hundred percent,” Nura says.

The FBI informant then hands him the phone. “Dial the number, brother,” Nura says.

The phone number is full of fives. “I’m scared of fives,” Malik says. “Five is evil, brother. The halfway digit, the saluting snake — no. I’m scared of fives. No fives.”

Nura and Malik then dial the number together, with the FBI informant pressing the fives. As soon as they finish, a SWAT team surrounds them and arrests Malik. The FBI’s case agent, watching the takedown from a nearby hotel room, celebrates the arrest. “Yes! Great job, guys!” he says.

A federal prosecutor, standing next to the FBI agent, claps his hands sarcastically. “Shitty job, guys,” he says. “Most of that bomb was dialed by us. What if some libtard on my jury thinks that’s a little unfair to Ali bin Weasel?”

This FBI sting didn’t really happen. It’s from British satirist Chris Morris’s new movie “The Day Shall Come,” which opened in New York and Los Angeles on Friday. What’s remarkable about that scene, as with much of Morris’s film, is that the absurdity is not far removed from reality.

Since the terrorist attacks of September 11, 2001, the FBI has used aggressive sting operations to catch would-be terrorists, providing all the weapons needed for supposed attacks and often a good amount of “dial the number, brother” prodding. To date, more than 300 defendants have been prosecuted following FBI terrorism stings.

These stings are often preposterous when examined closely. Derrick Shareef was arrested after buying grenades from an undercover agent; since Shareef didn’t have any money and was living with the government’s informant, the FBI set it up so that the undercover agent, posing as an arms dealer, would accept ratty old stereo speakers as payment. Emanuel L. Lutchman, a mentally ill and broke homeless man, planned to attack a New Year’s Eve celebration with a machete — a weapon he was able to buy only because the FBI gave him $40. The absurdities go on and on and on. Human Rights Watch criticized these types of FBI stings in a 2014 report for having “created terrorists out of law-abiding individuals by conducting sting operations that facilitated or invented the target’s willingness to act.”

Yet nearly two decades after the 9/11 attacks, FBI terrorism stings remain relevant. So far in 2019, 12 accused international terrorists have been charged following stings. The five-fearing Malik in “The Day Shall Come” is a composite drawn from dozens of terrorism sting defendants.

“Nobody we came across was scared of five,” Morris told me earlier this month from Edinburgh, Scotland, where “The Day Shall Come” was having its British premiere. “But the idea of freezing at the point where the FBI’s got them into a position where they think they’re dialing a bomb seemed very real. There are people who almost chickened out, so you think, what’s a ridiculous reason but one which an FBI agent couldn’t do anything about? Someone suddenly says they can’t dial the number five. So the jokes come when you look at the real situation and step a bit further.”

Islamist terrorism isn’t a new target of satire for Morris. His first movie, “Four Lions,” followed a group of inept British jihadis. His other credits include creating and producing British television shows and directing episodes of the HBO series “Veep.” For “The Day Shall Come,” Morris spent years researching FBI stings and talking to terrorism defendants, federal prosecutors, and FBI agents. By way of disclosure, he also talked to me, and I’m among three dozen people thanked at the end of the Morris’s film. I met Morris for coffee when he started researching FBI stings in 2012, but I did not play any further role in the movie. My connection was peripheral at best.

The main character in Morris’s film, Moses, played by Marchánt Davis, leads a group of black men in Miami known as the Star of Six. Moses is loosely based on Narseal Batiste, who led a group called the Seas of David. (The news media ultimately dubbed Batiste’s group the Liberty City Seven, which is the name that stuck.)

In real life, two scheming informants led Batiste and six of his followers in a supposed plot to bomb the FBI’s Miami office and the Sears Towers in Chicago. Batiste and his men swore an oath to Al Qaeda, which the FBI caught on camera, but their alleged plot to bomb buildings never went further than taking photos of the FBI’s office. Evidence in the case raised questions about whether Batiste was more interested in hustling the informant for $25,000 or participating in terrorism.

After three trials, prosecutors convicted five of the so-called Liberty City Seven. A few years ago, Jeffrey Agron, who was the foreman in one of the trials that ended in a hung jury, told me: “There were a fair number of people on the jury who believed that it was a scam. … On the other hand, when asked to pledge an allegiance to Al Qaeda, they did it. When asked to take pictures for the plot, they did take the pictures.”

Batiste and his co-defendants have all been released from prison; he is now a painter and lives in Houston. Because the case was so bizarre, Morris saw a Batiste-inspired character as an ideal vessel for demonstrating the absurdity of FBI terrorism stings.

“The shell of the Liberty City story contains so many glaring examples of ridiculous things happening,” Morris told me. But while the film’s Moses has a lot in common with Batiste, his story ultimately takes him much deeper into the FBI’s screwball antics than Batiste ever went.

After setting up the five-fearing Malik, Nura pretends to be an operative for both the Islamic State group and Al Qaeda. He tells Moses that the two terrorist groups are the same, and Moses doesn’t know any better. Moses is desperate for money because he’s facing eviction from his house, which doubles as a church in which he and his followers end prayers by praising “Allah, Melchizedek, Jesus, black Santa, Mohammed, and General Toussaint.”

He asks the informant if he can obtain uranium. The FBI then offers empty uranium canisters as part of a plan in which they’ll later provide fake nuclear material and arrest Moses. But the whole sting goes awry when the FBI discovers that Moses is running his own scam in an effort to get paid: trying to pass off the FBI’s empty canisters, which he and his followers have filled with urine and beans, as uranium to neo-Nazis in exchange for $100,000.

It’s a mess. At one point, Moses even approaches the FBI about becoming an informant on the neo-Nazis. But what makes “The Day Shall Come” so rich as satire is that the FBI, as an institution, is portrayed as an authentic and flawed character — and one that is every bit as scheming as Moses.

When Moses shows up unannounced at the FBI’s office, for example, the agents panic, fearing that their sting has unraveled. Case agent Kendra Glack, played by Anna Kendrick, assures everyone that she can meet with Moses and make him go away, thereby keeping the sting alive. “If he says the wrong thing, I leave it off the 302,” she says. The number is a reference to the FBI form that agents fill out after interviewing a subject. It’s a subtle jab at the FBI — a nod to criticism that agents, who do not record interviews as a matter of policy, only include material in written reports that benefits the bureau.