He was disassembling a handgun in a vehicle. Police think the vehicle could be linked to unrelated crimes.

MARYSVILLE — A 34-year-old man inadvertently shot himself in the leg while disassembling a loaded handgun in his vehicle on Wednesday. He reportedly didn’t have a permit to carry a concealed weapon.

The man was driving in the 6900 block of 37th Place NE. He spotted a patrol car nearby and became nervous, Marysville police Cmdr. Mark Thomas said.

Officers had previously talked with the man about the illegality of having a concealed firearm in a vehicle without a license, Thomas said.

He pulled into a neighborhood around 1:35 p.m. While he was taking apart the gun, the weapon fired.

He was taken to Providence Regional Medical Center Everett and was expected to survive.

Police believe the vehicle he was driving is associated with unrelated drug crimes. Officers were seeking a search warrant for the vehicle. No arrests have been made.