Oil giant Valero has been fined £5m and ordered to pay £1m in legal costs after four people died in an explosion at Pembroke refinery.
At the time of the explosion the refinery was owned by Chevron who will pay the £5m fine and £1m costs.
A deal was struck before ownership changed hands to Valero Energy UK Ltd shortly after the blast.
Julie Jones, Dennis Riley, Robert Broome and Andrew Jenkins all died in the blast in June 2011.
A fifth man, Andrew Phillips, survived the blast but suffered life changing injuries, after being “surrounded in flames”.
The explosion happened when flammable gases inside an oil storage tank ignited.
Families of the victims said they were shocked to hear the "list of errors" which led to the deaths of their loved ones.
It is clear from what we have heard that the explosion should never have happened.It has been shocking to hear the list of errors that led to the deaths of our loved ones. It is clear that the explosion was preventable and that no-one should have lost their life. It is a blessing that Andrew Phillips survived the terrible events of that day, he suffered life-changing injuries and he and his family have shared the pain that we all feel. Andrew, Denny, Julie and Robert were at the hearts of our families and are loved and missed by wives, partners, children, grandchildren, parents, brothers and sisters. They are in our thoughts and are missed everyday.
The five had been draining liquid from a storage tank as part of routine maintenance, unaware it contained highly flammable gases.
At around 6:20pm on Thursday June 2 2011, the tank exploded, engulfing those nearby in flames.
Today judge Mr Justice Lewis described it as "a fireball".
The force of the blast blew off the tank's steel roof which weighed 5 tonnes.
Specialist tank cleaning company B&A contracts, who were carrying out the work, and employed Robert Broome and Andrew Jenkins, was fined £120,000 and ordered to pay £40,000 in legal costs.
This incident, which had devastating consequences for all of those involved, was entirely preventable. Many opportunities to take action to control risk were missed, that would have prevented the incident from occurring. It is important to realise that the incident could have had even more serious consequences had the butane sphere or pipe track been damaged by the flying tank roof.
An investigation by the Health and Safety Executive (HSE), found the explosion was most likely to have been caused by the ignition of a highly flammable atmosphere within the tank.
It also found there had been long standing failures within the refinery safety management systems and as a result, the risks posed were "not understood or controlled".
Speaking at Swansea Crown Court Mr Justice Lewis said "no fine can ever reflect the value of a person's life", but that it is right that the two companies be punished and sentenced according to law.
Both companies had previously pleaded guilty to two counts each of breaching health and safety laws.
In a statement B&A Contracts said if there was anything they could do to turn back the clock they would do it "in a heartbeat".
If there was anything the company's directors could do to turn the clock back and stop Denny Riley, Andrew Jenkins and Robert Broome from going anywhere near the tank that exploded that day, we would do it in a heartbeat. They had no way of knowing it was ready to explode, and nor did the two Hertel employees, Julie Jones and Andrew Phillips. Denny, Andrew and Robert were dear friends to all of us, and Andrew was also family. We are so deeply sorry for all the families they left behind. If there are any positives to be taken from this tragedy, we Chevron and the industry we work in, have all learned from the mistakes made in 2011 and we have adopted a range of new safeguards so that this can never happen again