San Diego police say a 40-year-old man died after a border inspector shot him with a stun gun at the nation’s busiest crossing.

Police said Thursday that the man jumped over a counter and attacked an inspector after being escorted to a separate area for questioning at the San Ysidro port of entry between San Diego and Tijuana, Mexico. A records check revealed he was wanted on a felony charge.

Police say the man attacked as authorities tried to take him into custody Wednesday night. He was attempting to enter the US on foot.

Four Customs and Border Protection officers suffered moderate injuries and were hospitalized.

Authorities attempted to resuscitate the man, who was pronounced dead at a hospital. Police said he wouldn’t be identified until family members were notified.