California’s Justice Department said Monday it was launching an investigation into an oil spill that threatened Southern California wetlands and wildlife and closed down miles of beaches earlier in October.

The agency said it would work with federal and local authorities to determine the cause of the spill and what could have been done to prevent or minimize the disaster.

“The oil spill off the coast of Huntington Beach is an environmental disaster with far-reaching consequences for our fish and wildlife, for our communities, and for our economy,” Attorney General Rob Bonta said in a statement. “We will follow the facts wherever they lead us,” he added.

The spill, confirmed on Oct. 2, was first reported by residents who noted a petroleum smell in the area before seeing ribbons of murky black oil create a sheen across the water. Later, clumps of thick oil coated parts of the shoreline. As much as 120,000 gallons of oil may have leaked into the water, city officials said at the time, and the spill led California Gov. Gavin Newsom (D) to declare a state of emergency in Orange County.

It’s unclear what caused the oil spill but officials have eyed the possibility of a ship anchor rupturing the pipeline owned by Houston-based Amplify Energy, which shuttles crude from its three offshore platforms to a facility on the shore.

The investigation comes as Huntington Beach, sometimes known as “Surf City USA,” reopened to swimmers on Monday after coastal ocean and wetlands water-quality testing results showed “non-detectable amounts of oil associated toxins in our ocean water,” a joint statement from the City of Huntington Beach and California State Parks found.

“The health and safety of our residents and visitors is of the utmost importance,” Huntington Beach Mayor Kim Carr said in a statement about the reopening. “It is important that our decision to reopen our shoreline and water be based on data and that we continue to monitor the water quality going forward.”

This was the third time Southern California has suffered a major oil spill. The first near Santa Barbara in 1969 led to an estimated 80,000 to 100,000 barrels of crude oil spilling over 10 days and killed some 3,500 seabirds, as well as marine animals including dolphins and sea lions. That spill galvanized the country and led to the creation of Earth Day and a raft of new environmental laws. While California leads the nation in policies curbing fossil fuels, it still ranks as the nation’s seventh-biggest crude oil producer, according to the U.S. Energy Information Administration.

“It is unacceptable that Californians are once again facing the devastating effects of an offshore oil spill,” Sen. Alex Padilla (D-Calif.) said in a statement. “The trade-off between oil production and environmental harm is simply not one we should be making any longer,” he added.