SALEM, Mass. (AP) — A Massachusetts auto shop owner charged with dumping hundreds of gallons of used motor oil into the Merrimack River has pleaded guilty.

The Eagle-Tribune reports that 53-year-old Andres Pichardo pleaded guilty Thursday to three counts of disposing hazardous waste in a manner that endangers the environment just before his trial was scheduled to start.

Prosecutors say Pichardo told an employee at his Lawrence auto shop in 2015 to dump 30 55-gallon barrels of oil waste down a drain that leads to the river.

The judge noted that the Merrimack River is used for drinking water.

Pichardo was sentenced to five years of probation, ordered to pay a $5,000 fine to the state’s natural resources trust, and 100 hours of community service.