There’s a rain-soaked scene in “Indecent” that looms over the play, appropriately enough, like an impending storm.

Paula Vogel’s 2015 fact-based play follows a theater company as it prepares a 1923 Broadway production of playwright Sholem Asch’s “God of Vengeance,” a provocative Yiddish drama about two women’s sexual awakening that, on the show’s opening night, leads police to arrest the cast on obscenity charges. The primary source of controversy: a scene featuring a passionate kiss in a downpour between the two women — a prostitute and the daughter of a brothel owner.

Versions of the sequence are rehearsed and discussed throughout “Indecent,” which runs at Arena Stage through Dec. 30. Eventually, rainwater spills from the rafters and the scene from the play-within-the-play is staged in full.

“It’s not just beautiful because water comes out of the sky, which is theater magic at its best,” says Susan Lynskey, who plays Halina, the actor playing the prostitute. “It’s beautiful because it represents love and tenderness and joy.”

The fully realized version of the scene lasts all of 40 seconds. For the technical team at Arena Stage, though, getting that sequence right necessitated weeks of trial and error, in collaboration with director Eric Rosen and set designer Jack Magaw. It wasn’t until Nov. 21, two days before the first performance, that the actors rehearsed with the finished rain effect for the first time.

“It should blow the audience away,” “Indecent” technical director Natalie Bell says. “It’s important to be able to do whatever we can to make that moment right, and try to realize the director’s and the designer’s vision.”

To create the rain effect, the crew built a showerhead-like apparatus out of plexiglass that is connected to Arena Stage’s tap-water supply. After scrapping the first three designs, they landed on a version in which the water filters through a window screen, spreading the steady stream to create a more rain-like pattern.

The rain covers just a few feet onstage, engulfing the two actors but little more. Once the water hits the stage, it is drained through small holes drilled into the surface — which has been given a waterproof coating — and funneled to a spot beneath a center-stage hatch.

“Every single change that we’ve made along the way has gotten it to look more and more realistic and gotten it to drain more efficiently,” Bell says. “It’s all of those little tweaks that really add up to making the effect look the right way.”

The crew also installed a heater to keep the water at a comfortable temperature for the actors. Following the scene, Lynskey and co-star Emily Shackelford are greeted backstage by staff equipped with towels, robes and dryers.

After each show, crew members vacuum up the residual water onstage, and the water beneath the stage is collected from the hatch. The staff members use a fan to finish drying the surface, and within 20 minutes the stage is ready for the next performance.

The cast and crew hope audiences won’t fixate on any of those details, though, and will instead get swept up in that bit of “theater magic.”

“We believe that it is a spring rain caressing these two women who are falling in love, because we all worked together to create this illusion, which, when you have faith and belief, becomes absolute truth,” Lynskey says. “For an artist, that’s the reason to do it.”