Brought rocks to a gunfight.
I bet he was more likely firing a weapon (or about to). Rocks aren't likely to draw live fire. When he was hit, his friends left him and took the gun.
This article states:
Raul Martinez, a spokesman for the U.S. Border Patrol in San Diego, confirmed that an agent had fired on a man on Friday as he tried to cross the border near San Diego, after the would-be immigrant had thrown rocks at him.
The unidentified man crossed back into Mexico, where he later died of his injuries in a hospital.
"The Mexican government is demanding an investigation of the facts," presidential spokesman Ruben Aguilar said at a news conference.