A worker suffered fatal injuries after a horror accident saw him crushed with pipes and hit with a wooden post.
James Longair, 62, was working with pipes used in the oil and gas industry when tragedy struck.
One of the pipes rolled off a forklift and hit Mr Longair's legs before a wooden support hit him on the head.
Shocking CCTV footage showed the wooden support moved with such force that it was catapulted over a high fence after hitting him.
Emergency services raced to the scene at IODS Pipe Clad Ltd in East Kilbride, Lanarkshire, and Mr Longair was rushed to the Queen Elizabeth Hospital in Glasgow but he could not be saved.
An investigation found the system for moving the pipes at the yard was unsafe and led to Mr Longair's tragic death.
IODS Pipe Clad Ltd have appeared at Hamilton Sheriff Court and admitted breaching health and safety laws in September 2017.
The company updated rules and sent employees for counselling after the accident.
Depute fiscal Selena Brown said: "Mr Longair was struck on the head by a wooden board while assisting a colleague in the workshop.
"The men had stuck up several pipes on wooden stacks so that pipes did not move or role.
"On the day in question the men continued with their duties moving the pipes.
"A long pipe had already been stuck and another brought over which was shorter but they were too wide apart so the men decided that the long pipe should be lifted at one end so the position could be changed.
"Mr Longair was standing ready to move once the long pipe had been lifted at one end but it started to roll and as it did so he tried to escape but his feet were trapped by other pipes.
"It rolled off striking him on the leg and then the wooden board struck him on the head. That was later found to have been catapulted over the fence and was later returned by police.
"His colleague attended and tried to assist and an ambulance was called for and paramedics and the fire service attended.
"He was taken to the Queen Elizabeth Hospital where he succumbed to his injuries.
"A post mortem was carried out by doctors and the cause of death was ruled as a head injury due to an accident at work."
Clare Bone, defending, said: "I have been asked to express their sympathies to the friends and family of James Longair for their tragic loss.
"There are two representatives including the company director and CEO here marking the seriousness that they and the company take this matter.
"The company has the highest regard for health and safety and takes its responsibilities very seriously and this comes from the top down to the shop floor.
"The tragic incident is isolated in nature and the company has been unequivocal with their responsibility to it.
"The system for moving pipes had been in place since 2009 with no incident until the fateful events and in that time there had been 12,320 movements of these pipes and nothing was amiss.
"The company had no reason to believe that the deceased would place himself where he did but that is what happened.
"They had no reason to believe that anything other than an appropriate system was in place but it did take this incident for that to be highlighted.
"It had a prolific effect on the staff who were offered counselling and all those persons working were ordered to attend at least one session.
"The company has responded appropriately to this tragic event and have taken steps to prevent an incident of this tragic nature happening again and they wholeheartedly accept responsibility."
Sheriff David Bicket deferred sentence until later this month to consider the size of the fine the company will be handed.
He added: "I'm well aware that a fine can never replace anyone from a tragic incident like this."