Unusually high waves attributed to the eruption of an undersea volcano in Tonga caused an oil spill on the Peruvian coast, but authorities said Monday the spill was controlled within hours and there's an ongoing process to clean the area.

The Peruvian Civil Defense Institute said in a press release that a ship was loading oil into La Pampilla refinery on the Pacific coast on Sunday when strong waves moved the boat and caused a spill.

The government didn't say how many gallons were spilled only that local and federal authorities were working to clean the coast.

Workers clean up an oil spill at Cavero beach in Ventanilla, Callao, Peru, Monday, Jan. 17, 2022. Unusual high waves that authorities attribute to the eruption of the undersea volcano in Tonga caused the spill on the Peruvian Pacific coast as a ship was loading oil into La Pampilla refinery on Sunday. (AP PhotoMartin Mejia)

Workers clean up an oil spill at Cavero beach in Ventanilla, Callao, Peru, Monday, Jan. 17, 2022. Unusual high waves that authorities attribute to the eruption of the undersea volcano in Tonga caused the spill on the Peruvian Pacific coast as a ship was loading oil into La Pampilla refinery on Sunday. (AP PhotoMartin Mejia)

La Pampilla refinery, in the province of Callao near Lima's capital, belongs to the Spanish company Repsol. It's considered the main oil processing plant in Peru. Local authorities had closed area beaches to the public since Sunday.

The eruption on Saturday caused waves that crossed the Pacific. In Peru, two people drowned off a beach and there were reports of minor damage from New Zealand to Santa Cruz, California.

Workers clean up an oil spill at Cavero beach in Ventanilla, Callao, Peru, Monday, Jan. 17, 2022. Unusual high waves that authorities attribute to the eruption of the undersea volcano in Tonga caused the spill on the Peruvian Pacific coast as a ship was loading oil into La Pampilla refinery on Sunday. (AP PhotoMartin Mejia8

Workers clean up an oil spill at Cavero beach in Ventanilla, Callao, Peru, Monday, Jan. 17, 2022. Unusual high waves that authorities attribute to the eruption of the undersea volcano in Tonga caused the spill on the Peruvian Pacific coast as a ship was loading oil into La Pampilla refinery on Sunday. (AP PhotoMartin Mejia8