DETROIT — The federal border agency said Sunday that a Canadian man was shot and wounded after pointing a handgun at guards at the Ambassador Bridge crossing between Detroit and Windsor, Ontario.

Customs and Border Protection said in a statement that the man stopped his car before an inspection booth around 3 a.m. on Sunday and starting walking toward border officers while waving a gun.

The officers ordered him to drop the weapon, but the man refused and instead pointed his gun in the officers’ direction, prompting them to open fire.

The man was treated at a hospital before being taken to jail, Kris Grogan, a spokesman for Customs and Border Protection, said in a statement.