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.

READ MORE: Detectives Search For 2 Men Who Followed Teen Girl In Rancho Santa Margarita

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.

READ MORE: Hundreds Of Pounds Of Human Waste, Needles Cleaned From Former Homeless Encampment At Echo Park

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.

MORE NEWS: Police Break Up Large Party At Tarzana Home Of Singer Chris Brown

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