GREENWICH — Crews were set to continue cleanup efforts overnight after 300 to 400 gallons of oil were discharged into a local waterway after a malfunction at an auto dealership in central Greenwich early Wednesday afternoon.

Fire personnel put down booms in the Horseneck Brook to stop the flow of used motor oil.

“The majority of it was contained,” Deputy Fire Chief Brian Koczak said Wednesday evening.

The spilled happened at New Country Audi on West Putnam Avenue as a contractor was removing used motor oil, Koczak said.

“There was a malfunction,” he said, and the oil began to discharge into the nearby Horseneck Brook. “It’s a tidal creek, and it flows into Long Island Sound,” Koczak said.

“We ensured that the leak was controlled, and then we responded with booms downstream,” the deputy chief said. Most of the spill was contained in the area of Field Point Road and Prospect Street, and additional booms were placed farther downstream as an additional safeguard.

Workers were using mechanical devices and other means to remove the motor oil from the brook. “They’re going to be there all night,” said Koczak.

The spill posed no threat to public health, but firefighters found an egret coated in oil and cleaned it off in the afternoon, he said. It was later released after a thorough cleaning, he said. Environmental regulators will be on alert for other wildlife impacted by the spill.

The Audi dealership, and the contractor involved in the spill, were fully cooperative, Koczak said.

The state Department of Energy and Environmental Protection arrived the on scene shortly after the accident and were assisting with the response.

Used motor oil is stored on-site at the dealership until a contractor picks it up for removal on a regular basis.