A US Customs and Border Patrol agent was shot at Sunday morning while sitting in his marked patrol car around a half mile west of the San Ysidro border crossing, missing the agent by inches.

At least two bullets struck the driver's side of the patrol car at approximately 2:15 a.m. about a mile and a half west of the Port of Entry, according to William Rogers, a supervisory Border Patrol agent in the San Diego region. The agent was not injured and quickly drove to a safer location according to the Los Angeles Times.

Officials say the gunfire appears to have come from Mexico, while Mexican authorities arrested two people in the incident. One had a handgun while the other was released.

A marked #BorderPatrol vehicle took gunfire near #ImperialBeach this morning when an assailant believed to be in Mexico opened fire, narrowly missing the agent inside. Mexican authorities have 1 subject in custody, and are working with U.S. law enforcement to secure the area #CBP pic.twitter.com/gwfPsdHSOL — CBP San Diego (@CBPSanDiego) September 10, 2018

The FBI is investigating the shooting.