A 40-year-old U.S. citizen died after a border inspector shot him with a stun gun at the nation's busiest crossing, authorities said Thursday.

San Diego police said the man jumped over a counter and attacked an inspector after being taken to a separate area for questioning at the San Ysidro port of entry connecting San Diego and Tijuana, Mexico. A records check showed he was wanted on a felony charge.

The U.S. Customs and Border Protection agency said the man attacked two inspectors and described him as "combative" in a statement. It said officers found heroin during a body search.

The man attempted to enter the U.S. on foot Wednesday afternoon, about four hours before the shooting, according to Customs and Border Protection. Authorities attempted CPR on the man, who was pronounced dead at a hospital.

Police said the man would not be identified until his family was notified.

Four Customs and Border Protection officers suffered injuries and were hospitalized. Police called the injuries moderate; Customs and Border Protection said they were minor.

Customs and Border Protection said San Diego police, the U.S. Department of Homeland Security's inspector general and its own internal affairs office would investigate.

About 50,000 motorists and 25,000 pedestrians enter the country daily at San Ysidro, more people than the top two U.S. airports for international arrivals combined — New York's John F. Kennedy and Miami.