A 20-year-old man is facing various gun-related charges after allegedly shooting himself while at a restaurant in Scarborough and then crashing his car when he tried to flee the scene.

Police say a man entered a restaurant near Markham Road and Painted Post Drive on Labour Day around 4 p.m. to place a take-out order. While inside the restaurant, the man accidentally shot himself with a gun he had hidden in his pants.

In a news release issued Wednesday, police said the man left the area in a vehicle and discarded the gun.

While fleeing the scene, the man was allegedly involved in a fail-to-remain collision near Brimorton Drive and Scarborough Golf Club Road. Police allege he abandoned the vehicle and ran into a nearby house, where he was arrested.

On Tuesday, investigators found a loaded sawed-off rifle in a wooded area near Highland Creek. They believe it was the discarded firearm used in the shooting.

A suspect police have identified as Toronto resident Abdihakim Saeed has been charged with multiple gun offences in connection with the incident, including possessing a loaded firearm knowing its serial number has been defaced, careless use of a firearm, dangerous operation of a motor vehicle, and failing to remain at the scene of an accident.

The suspect appeared in court on Tuesday.