The oil firm Shell has been fined £900,000 following the deaths of two workers on a North Sea platform.
Keith Moncrieff and Sean McCue died in the gas tragedy in 2003
Sean McCue and Keith Moncrieff died in a massive gas escape on the Brent Bravo platform in September 2003.
They had been sent down into the utility leg to inspect a temporary patch on a leaking pipe.
Shell had admitted breaching three health and safety regulations. It is thought to be the biggest fine on a company following a North Sea accident.
Sheriff Patrick Davies said a "substantial catalogue of errors" caused the deaths of the two men.
He said any fine had to be substantial but he took into account that Shell had tendered guilty pleas at an early stage.
Mr Moncrieff, 45, from Invergowrie, Tayside, and Mr McCue, 22, from Kennoway, Fife, had been working on a utility leg of the platform.
The two men had been asked to look at a temporary repair patch on a safety-critical pipeline in the leg. The patch had been a temporary repair for 10 months.
BBC Scotland reporter Colin Wight said: "Whatever happened down there, and investigators did find a screwdriver and a piece of rubber afterwards, it was confounded by the failure of three valves which had also been at fault for a considerable period of time."
Sixty non-essential staff were evacuated by helicopter from the platform 116 miles north-east of Lerwick after the gas was detected.
A doctor was flown in from another platform to treat the two, but they later died.
Speaking outside the court, Greg Hill, production director for Shell Exploration and Production in Europe, said: "Our thoughts and prayers are with the families and friends of Keith and Sean.
"It is clear that a complex series of factors led to this incident.
"It is also clear that we had failures in our systems and we feel 100% responsible for the deaths of these men."
Mr Hill added that the company had now carried out a number of checks on their Europe-wide installations.
Mr Moncrieff's wife Helen, 48, who was in court with his daughter, Jenna, 24, said: "It was a series of unfortunate circumstances - if one of the valves had not been broken then it would not have happened.
The two men died after a gas leak in a leg of the platform
"Shell have said they are going to make improvements and hopefully that will mean better conditions for the lads out there on the platform."
Jenna added: "The fine is not going to bring Keith or Sean back, nothing is going to change.
"I just hope it doesn't happen to anyone else's daughter."
Jake Molloy, of offshore union OILC, said: "It is a record for fines relating to offshore incidents in the UK, but you have to ask what level of fine delivers justice when a company is earning in excess of a million pounds an hour?
"We are also keen that the Lord Advocate should stage a Fatal Accident Inquiry because there are so many unanswered questions."
He said the union had made a complaint to the HSE alleging that Shell was breaching regulations in March 2003.
He added: "In August 2003 the HSE said there was no risk to staff, three weeks later two men die."
After the hearing, Tom McLaren, a principal inspector with HSE's offshore division, said he could not understand why unions were accusing them of failing to regulate the offshore industry.
He said: "Shell had 15 enforcement notices from us last year, three prohibition notices, 12 improvement notices and they've been in court twice."