BROOKLYN, N.Y. — Con Edison crews are working to clean up a transformer malfunction that poured thousands of gallons of oil into the East River Sunday.

Officials say a transformer insulating oil was released from one of the substations in Brooklyn. The transformer that failed contained 37,000 gallons of oil used with electrical equipment, a statement from Con Ed read.

The oil was released into the station property and the East River. It seeped into the ground as it moved to the riverbank.

A Con Ed spokesperson said they believe more than half of the oil is still inside of the transformer.

The oil spill could be seen for miles.

The spill also caused a voltage dip that impacted the MTA's subway service. The system problems caused major delays on several subway lines throughout the five boroughs.

Con Ed placed absorbents and skimmers in the river as part of the cleanup process. They are also working with the U.S. Coast Guard, the New York State Department of Environmental Conservation and other agencies to remove as much oil from the water as possible.

"We will continue to assess the volume of oil that migrated to the East River, and how much oil remains in the ground on our property," Con Ed said Monday morning.

Speed restrictions are in place for boats as crews assess how much oil is in the river.

Con Ed officials say they have recovered approximately 500 gallons of oil in the cleanup process.

The spill is creating problems for NYC Ferry, which travels near the East River.

"The East River route will be subject to delays for the remainder of the day as a result of an oil spill on the East River," a statement on the NYC Ferry website read.

Ferry riders are urged to check with the NYC Ferry website for further information about delays.

It was not immediately clear when the restrictions would be lifted.

"We are taking all actions to contain and clean up the oil as safely and as quickly as possible," a Con Ed spokesperson said.