The discovery came hours after residents across the immediate region reported a mysterious odor.
In Middletown Township, Delaware County, Sunoco officials tell Action News that a valve malfunction has leaked a petroleum-based product from an 8-inch pipeline. The valve has since been shut off, but it's still unclear what caused the malfunction, or for how long.
Emergency crews narrowed in on the Turnbridge Apartments on Glen Riddle Road apartment complex where residents were being told to shelter in place Monday night.
A few hours later officials placed the situation under control as hazmat crews said air monitoring no longer registered dangerous levels of Volatile organic compounds. The DEP is taking over the investigation.
When the incident began the smell of gasoline was so strong, it was difficult for some people to breathe.
"I have fans going in my apartment, I opened the sliding door but the outside air is worse than inside," said Joan Hill.
Sunoco said there was no impact to air quality, saying in a statement, "There was a small misting of gasoline this evening that was the result of a tubing leak on our 8-inch refined products line that runs through Middletown Township in Delaware County. The pipeline was shut in and the situation was quickly contained. While there is an odor, there is no risk to those in the area. The emergency response units that were on-site confirmed that there is no impact to air quality. We expect the odor to dissipate as our crews work throughout the night to remediate the area."
A few people including first responders were sickened by the fumes and had to be treated on the scene.
It's unclear if this leak is linked to other mysterious odors being reported across the county on Monday and last month.
At least a dozen municipalities from Chester, Swarthmore and Ridley Park reported the odor which generally is described as a petroleum-based product such as natural gas or heating oil.
"We can't confirm any of these events had to do with this pipeline cause we actually have product on the ground here. The other was an odor investigation, so it's still trying to be determined. As I said earlier, Delaware County is very concerned, we don't know the source of the odors we keep getting," said Timothy Boyce, director of Delaware County Emergency Services.
RELATED: Odor of fuel/gas being reported across Delaware County
Authorities say they learned of the leak from residents' complaints and not Sunoco, and they are looking into why.
"For us to react quickly in a sensible way and inform the public, we need to know right away, we will follow up as to why there was a delay," said Boyce.
Officials are also trying to determine just how much gasoline actually leaked onto the ground.