The busiest border crossing in the country was open again Wednesday morning after closing for hours during a shootout between federal agents and vans suspected of smuggling illegal immigrants into California from Mexico.

Four were injured and traffic was stopped for four hours Tuesday near San Diego after the border patrol agents fired shots at the vehicles across nine lanes of highway.

The 74 people crowded into the three vans were taken into federal custody.

San Diego police spokesman Lt. Kevin Rooney said Tuesday the drivers tried to storm past inspectors at the San Ysidro port of entry — which connects San Diego and Tijuana, Mexico — and make their way into the U.S. without stopping.

Two U.S. Immigration and Customs Enforcement agents and a Customs and Border Patrol agent fired their guns to try to prevent them from crossing, he said. There was no return fire.

"It was human smuggling, definitely," ICE spokeswoman Lauren Mack said.

The shootout occurred over nine of the 24 northbound traffic lanes, said Monica Munoz, a San Diego police spokeswoman.

Three people were shot and injured in the vans, authorities said, and one vehicle smashed into another as it tried to bypass border inspectors, injuring a fourth person.

One person who was injured remained in critical condition Tuesday night, authorities said. The others were expected to recover.

"They got caught in traffic, and the last one tried to back up. The other two drove wildly looking for an open space to drive through," Rooney said. "That's when they encountered the three agents, who all ended up firing from different vantage points."

The San Ysidro port of entry connects San Diego and Tijuana, Mexico. About 40,000 vehicles cross into the U.S. at the port each day, and it has 24 northbound lanes.

Those lanes were closed after the 3:30 p.m. incident, causing a rush-hour traffic jam as drivers on the Tijuana side were turned back.

Motorists were told to make their way through Tijuana's crowded streets to San Diego's only other border crossing at Otay Mesa, about five miles to the east.

Eight northbound lanes were eventually reopened around 7:30 p.m.

Rooney said the three vans pulled into the same lane, and the first driver gave his license to a border agent.

When the agent stepped back into the booth to run the license, all three vans drove quickly into the U.S. side.

The San Diego Police Department's Homicide Unit will investigate the shooting.

The Associated Press contributed to this report.