SAN DIEGO (CBS) — Investigators on Friday were still trying to determine why a man tried to rush across the U.S.-Mexico border in a dash that ended with a Customs and Border Protection agent firing his weapon.

KNX 1070’s Kim Marriner reports the man was shot several times, but is expected to recover.

Officials said it all started when an “increasingly nervous pedestrian attempted to enter the U.S. at the San Ysidro crossing, according to San Diego Police Lt. Kevin Rooney.

“When the border agents engaged him in conversation and asked for his documents, the man became increasingly nervous and attempted to run away northbound through the turnstile and into the United States,” said Rooney.

Border agents then chased after the suspect, who pulled what officials believe is a “replica handgun” out of his waistband and pointed it skyward, said Rooney.

Agents yelled “Gun” and one fired at the suspect several times after believing he heard a shot.

The suspect received surgery at a local hospital for non-life threatening wounds.

An investigation is underway by the San Diego Police Department to determine whether the border officers’ use-of-force was justified.