Mexico City, Mexico (CNN) -- About 5,000 Mexican motorists along the border near San Diego, California, protested the death of an illegal immigrant last week while in the custody of U.S. border agents, the Notimex news agency reported.
The San Diego police department is investigating Anastacio Hernandez Rojas' death, which the medical examiner ruled a homicide.
Hernandez was detained, beaten and shocked with a Taser on May 28, San Diego police said, and died three days later in a Chula Vista, California, hospital.
Mexican President Felipe Calderon issued a statement Thursday saying his government will use all diplomatic means to make sure all the details come to light.
The protest began with about 450 demonstrators who carried signs as they marched on a pedestrian bridge near the border, Notimex said. Thousands of drivers who were waiting to cross the border into the United States started to sound their horns in unison, the government-funded news agency said.
The motorists occupied 10 lanes on two highways for more than a mile, Notimex said, calling the event unprecedented.
Hernandez died of cardiac arrest, but methamphetamine abuse and hypertension were also contributing factors, an autopsy found.
The altercation occurred at the San Ysidro Port of Entry when U.S. Customs and Border Protection agents were trying to deport Hernandez to Mexico, San Diego and federal authorities said. Hernandez became combative, the officials said, and force was used to restrain him.
"One of the agents used a baton to administer to the subject to get him to stop fighting," said San Diego homicide Capt. Jim Collins. "When that was not successful, they used the Taser."
Hernandez stopped breathing shortly after the Taser was used, San Diego police said in a statement May 29.
Notimex said the man was brain dead and doctors proposed disconnecting him from life support.
He died Monday afternoon at Sharp Chula Vista Medical Center, a hospital spokeswoman and police said.