New York (CNN) -- A propane gas tank leak that prompted the evacuations of an estimated 900 homes in Shirley, New York, was contained, officials said Saturday night.
After conducting an air quality sampling of 100 residences, officials decided to allow all residents to go home, said Suffolk County spokesman Dan Aug. Electricity was restored, with the exception of a shopping center that holds the 30,000-gallon underground storage tank.
Fire and other workers were able to close a leaking valve on the tank in the Long Island town, Suffolk County Executive Steve Levy said in a statement.
The leak was discovered at 1:15 a.m. by a driver of a propane delivery truck, the county said.
Red Cross spokesman Craig Cooper arrived at a local high school about 3 a.m. Saturday to help some of the evacuees, many of whom were without important medications.
"People literally showed up in their pajamas," he said, estimating that about 150 residents had registered at the school.
The leak affected a five-mile radius around Shirley on Long Island's southern shore, according to Sgt. Greg Heller of the Suffolk County Police Department.
Heller told CNN that the leak was not suspicious, but because propane gas stays low and close to the ground, authorities decided to evacuate nearby homes.
The leak also shut down rail service between Patchogue and Speonk, according to Long Island Rail Road spokesman Mike Lewi.
"I commend our county, town, American Red Cross and volunteer emergency services personnel for this tightly coordinated response," said Levy.
CNN's Laura Batchelor and Angelica Bonus contributed to this report.