Lax safety checks and processes led to the tragic death of a young worker at Clydeport's Hunterston terminal.
The company has been fined £300,000 following the death of Craig Logan, 22, last February when he was crushed on one of the terminal's cranes.
Clydeport apologised and admitted that Mr Logan 'paid with his life' for their shortcomings.
Kilmarnock Sheriff Court was told that the young man's death, which happened as he checked a fault on the equipment, came just one day before a planned risk assessment.
Specialist rope rescue teams and medics were called out but the mechanical engineer died at the scene in February 2015, Kilmarnock Sheriff Court heard.
Operator Clydeport Ltd admitted health and safety breaches by failing to make risk assessments and ensure safe working systems between July 2014 and February 2015.
The lapses included failing to ensure the north unloader crane cab was electrically isolated so it could not re-start unexpectedly, or to provide means for workers to communicate with each other.
Clydeport also failed to provide access to a lift and sling system so staff did not have to move the cab physically, or identify risks of injury from from freeing the cab when it was stuck, or falling from the boom.
Ironically, the tragedy happened the day before a safety assessment was due to be made, following the departure of key managers with responsibility for health and safety.
Sheriff Shirley Foran expressed sympathy to the family of Mr Logan and said the penalty she had to impose "in no ways reflects the value of his life."
Sheriff Foran added the absence of a qualified risk assessment engineer and health and safety manager for seven to eight months before the incident meant the company "knew they were thereby exposed."
The assessment due the day after Mr Logan's death was the "most bitter of ironies", Sheriff Foran added.
A spokesman for Clydeport, which has previous health and safety convictions, said outside court: "We failed to meet the very high standards we set ourselves and a young man tragically paid with his life, for which we are sincerely sorry.
"The failures which contributed to this tragic accident should have been avoided and indeed, a full external health and safety review was already due to start the day after Craig died.
"Since the accident, we have comprehensively reviewed our approach to health and safety at Hunterston to do everything possible to ensure there can be no repeat."