Around the time New Yorkers started fretting over the city’s first diagnosis of Ebola last Thursday, Sal Pain began drawing up plans for four decontamination chambers, customized for a cramped Harlem hallway.

The narrow dimensions of the hallway — it was only four feet wide — outside the fifth-floor apartment Dr. Craig Spencer, the Ebola patient, shares with his fiancée was among the more difficult situations confronted by hazardous-materials workers in their efforts to contain the virus. The standard decontamination station, a bulging, inflatable unit, would not do.

So Mr. Pain, the chief safety officer for Bio-Recovery Corporation, which has cleaned Dr. Spencer’s apartment and the Gutter, a bowling alley Dr. Spencer had visited in Brooklyn, improvised. He lined the hallway walls with six millimeters of plastic on Friday morning, and then made a frame out of PVC pipe. About 12 hours later, after sterilizing everything from four bicycles to a cuticle cutter, the 10-member crew stood in the hallway and washed themselves with chemical and water showers.

As public officials sought to quell fear among New Yorkers, Mr. Pain and his team worked in the trenches, trying to make those reassurances real.