A fuel company has been fined £3 million after gas leaks on one of its platforms over three years ago.
ConocoPhillips admitted safety failings at Lincoln Crown Court following two uncontrolled and one controlled gas release 70 miles off the Lincolnshire coast at the end of 2012.
The Health and Safety Executive (HSE) said the lives of up to 66 workers were put in danger if an ignition had occurred.
The company pleaded guilty to three breaches of the Offshore Installations (Prevention of Fire and Explosion, and Emergency Response) Regulations 1995.
It was fined £3,000,000 (£1m for each offence) and ordered to pay costs of £159,459.
Speaking after the hearing, HSE inspector John Hawkins said: "There was a failure to identify the risk posed by the high-pressure vent systems when carrying out intrusive maintenance work.
"ConocoPhillips failed to put in place appropriate process isolations to isolate the high-pressure vent from the worksite.
"An assessment of the full extent of the maintenance intervention work was not carried out and the full isolations required were not identified.
"Our investigations indicate there was a deviation from following procedures fully. The underlying cause of the incident was the inadequate implementation, control and oversight of the permit to work system, and the common isolation procedure.
"It is only a matter of good fortune these incidents didn't result in a serious, tragic incident."