"During the encounter, the subject produced a firearm and shot at the agent. The agent returned fire striking the subject," according to a statement from U.S. Customs and Border Protection. "The subject was transported to a local hospital where he was later pronounced dead."
The agent approached a group of four people, when one of them pulled out a gun and started shooting, according to the CBP statement.
No agents were harmed in the shooting, which took place around 6 a.m. in Sunland Park New Mexico, a suburb of El Paso, Texas.
Border Patrol agents blocked off the crime scene, closing a main road in Sunland Park and stretching crime tape between their patrol vehicles.
An auto shop and a car dealership on either side of the street were closed.
The shooting is being investigated by the CBP's Office of Professional Responsibility.
No additional information was released.