Peru's consumer protection agency is suing Spanish oil firm Repsol over a huge oil spill which blackened beaches off the coast of Lima in January.
The spill, which Peru called the worst ecological disaster around Lima in recent memory, leaked more than 10,000 barrels into the Pacific Ocean.
The civil lawsuit seeks $3bn (£2.54bn) for environmental damage and $1.5bn (£1.27bn) for damages to locals.
Repsol has denied responsibility.
The company initially said the spill was caused by "sudden and extraordinary anomalous waves produced by the volcanic eruption in Tonga". However, it later blamed the oil tanker.
On Tuesday, a Peruvian judge admitted the $4.5bn lawsuit by Indecopi against Repsol, meaning the case will go to court.
An underwater oil pipeline owned by the company caused a spill on 15 January. It happened when an Italian-flagged tanker, Mare Doricum, was unloading at Repsol's La Pampilla refinery.
Repsol has denied responsibility for the spill and said that it sees the claim as "baseless, inadmissible, and inconsistent".
"We have not yet been notified of the court's acceptance of the complaint, and we do not know the details of the acceptance," a spokesperson for the firm told the BBC.
"We reiterate that the causes are still under investigation, but that the preliminary findings indicate that it was caused by an uncontrolled movement by the Mare Doricum vessel while it was unloading crude at the terminal."
"Even so, Repsol has used all means at its disposal to contain, clean, and remediate the coastline, assist the communities in the area, and rescue and attend to the fauna affected by the oil spill," the spokesperson added.
Earlier this year, President Pedro Castillo described the spill as "one of the biggest ecocides ever on our coasts and seas".
Hundreds of fishermen and hospitality workers also lost income due to the disaster, according to the Peruvian environment ministry.
Local fisherman staged protests because they were unable to go out to sea and work because of the spill.
Indecopi has alleged that the ecological damage is continuing to affect fishermen and the environment.
"We are looking to get compensation for the affected population... that lives within 150km of contaminated coast," said Julian Palacin, the head of Indecopi, in a statement.
In January, prosecutors also opened a criminal investigation into Repsol's role in the incident. Four executives from the firm were barred from leaving the country for 18 months amid the ongoing probe.
In May, Repsol said the clean-up would cost the firm $150m (£127m).
Repsol posted a net income of €2.499bn (£2.11bn) last year - sixteen times the clean-up cost.
Professor in geosciences at the University of Edinburgh, Stuart Haszeldine said that communities and countries "have a right to expect safe transport of oil and gas".
"There is no established market to buy a clean beach or a seabird colony - inevitably large and financially well-resourced oil companies can deploy cash, lobbyists and legal teams to delay and defocus the blame game away from their responsibility," he said.
"This will be a contest on the strength of Peru's legal system to enforce environmental justice onto an unwilling and well-resourced multinational."
"The final settlement may be influenced as much by Repsol's valuation of its own reputation and future permissions to operate globally," he added.
Melissa Moore, head of UK policy at Oceana, a charity campaigning for ocean protection, said she was pleased to hear the case would go to court.
"This damaging oil spill wreaked havoc on two protected biodiversity areas: the Ancón Reserved Zone and the Pescadores Islets - home to iconic and legally protected species such as the Humboldt penguin and sea otter," she said.
"Countries globally such as Peru, as well as the UK, need to end our reliance on offshore oil drilling, which has destructive impacts on the ocean, including accelerating climate change."