In what police are calling a terrible accident, a 9-year-old boy was seriously injured in an accident involving the garage door of his family home in Oakville, Ont. on Monday night.

Halton Regional Police said the boy's jacket got caught in the opening door as he entered the garage from the outside.

The boy punched in the passcode on the keypad outside, then was going under the door as it was rising when his hooded sweatshirt got stuck on the exterior handle of the garage door.

Two people who were passing in a vehicle saw the injured boy and rushed to help him. A family member and a jogger also helped to free the boy.

It is not clear how long the boy was hanging before he was found.

Paramedics arrived at the home on Pine Glen Road, near Third Line and Dundas Street West shortly after 7 p.m.

The boy was rushed to a nearby hospital before being transferred to Sick Kids hospital in Toronto, where he remains in critical condition.

In a statement, Halton police said an investigation revealed there was nothing suspicious about the accident.