The Royal Mint has been issued an enforcement notice after 6,000 fish were killed from pollution which was discharged from the plant.
Thousands of fish were killed by the pollution
Problems at the factory meant that "considerable quantities of chlorine" were released into the River Ely.
Within a 2km stretch of the river 6,000 fish were found dead, including 1,500 salmon, 650 trout and 3,200 bullheads.
The Mint in Llantrisant said it "very much regrets" the incident and has agreed to pay to restock the river.
The Environment Agency Wales served the enforcement notice on the plant on Monday.
It said that the level of pollution would normally lead to prosecution but that the Royal Mint was protected from such action by Crown Immunity.
The company operates a manufacturing process which involves melting and metal surface treatment of non-ferrous metals.
It is licensed through a permit to discharge treated effluent to the River Ely at Ynysmaerdy in the south Wales valleys.
The agency was alerted by members of the public on 8 May after dead fish were first discovered.
Samples of water were tested and an investigation launched which revealed processing difficulties in the company's effluent treatment plant on the site resulting in chlorine being released into the river.
Agency enforcement officer Dr Norman Allen said: "This incident was the result of a number of basic operational and managerial staff failings.
"Furthermore weaknesses to the maintenance procedures for some plant equipment was identified as requiring improvement.
"The environmental impact on this stretch of the River Ely that had been recovering well from previous incidents was very serious and entirely avoidable."
The Royal Mint has been ordered to restock the river
An enforcement notice was issued which means that the Royal Mint will have to pay for the costs of the investigation as well as pay for the restocking of the river.
Other conditions are attached to the notice which include improvements to the effluent treatment processes and a review of the options for treatment and disposal of effluent in order that the River Ely is protected against future pollution from the site.
A spokesman from the Royal Mint said they regretted the incident and that £250,000 had been set aside to improve procedures.
"The Royal Mint very much regrets this incident and immediately took action to prevent any reoccurrence," he said.
"We give full reassurance to the Environment Agency and to the general public that we have learned lessons from this incident and put in place all the necessary measures to comply with our pollution control permit," he added.