San Diego police say the shooting took place Monday night in a secondary vehicle inspection area near the San Ysidro Port of Entry. Police say the suspect's vehicle was blocked and he opened fire on the officers.
KNSD-TV obtained video showing gunfire erupted as cars waited in line to get into the U.S.
Border agents yelled, "Get down, everybody get down!" At least a dozen shots were heard.
The officers returned fire, and the suspect was hit. CBP officers and fire-rescue attempted life-saving measures, but he did not survive.
Police say the name of the 23-year-old U.S. citizen was withheld for family notification.
None of the seven officers involved was injured.
This story has been corrected to show that the officers involved are with Customs and Border Protection, not Border Patrol.