The agents returned fire, and three people in the vans and a motorist were wounded, Lauren Mack, a spokeswoman for US Immigration and Customs Enforcement, said, describing the incident at the congested San Ysidro crossing between the Mexican city of Tijuana and San Diego.

Mack said the border crossing partially reopened on Tuesday evening. A Mexican border hotline for motorists said seven lanes at the crossing were open.

Mexico's violent drug gangs are increasingly moving into the lucrative people-smuggling business, but tight US border security is forcing them to take bigger risks to get narcotics and illegal immigrants into the US.

The latest attempt was unprecedented at the heavily guarded crossing where helicopters circle overhead and armed agents with dogs keep watch at a series of staggered checkpoints.

All the illegal immigrants were arrested and taken into custody. The crossing, a major smuggling corridor for narcotics and illegal immigrants, was shut while police conducted the investigation.

Some 90 million people a year use the California-Mexico land border crossings, with almost half the traffic going through San Ysidro.