A film production company on Tuesday admitted health and safety breaches over an accident on the set of “Star Wars: The Force Awakens” that broke the leg of star Harrison Ford.

The actor was struck by a hydraulic door on the set of the Millennium Falcon — his character Han Solo’s spaceship — at Pinewood Studios near London in June 2014. He was airlifted to a hospital for surgery.

During a hearing at Milton Keynes Magistrates’ Court in Britain, prosecutor Andrew Marshall said the door “could have killed somebody” had an emergency stop button not been hit. Britain’s Health and Safety Executive said the metal-framed door struck Ford with a power comparable to the weight of a small car.

Foodles Production Ltd, which is owned by the Walt Disney Co., admitted two breaches of health and safety law, although its lawyer, Angus Withington, said Foodles would contest the level of risk involved.

The company will be sentenced next month.

Production on the film was suspended for two weeks after the accident to Ford, who was 71 at the time.

“The Force Awakens” is the seventh installment in the space saga and has taken more than $2 billion at the worldwide box office since its release last year.

Filming is underway on the eighth Star Wars film, directed by Rian Johnson and due for release in 2017.