Two people were in federal custody Wednesday, and three people were recovering from injuries after authorities said the driver of a rented sport utility vehicle tried to enter a secured area of the top-secret National Security Agency.

Authorities quickly concluded the incident was not terrorism. In late afternoon, an FBI spokesman said one theory being investigated is whether the driver mistakenly turned onto a restricted parkway exit and panicked when he saw heavily armed police.

“Until we complete all the interviews, we just can’t say definitively,” said David Fitz, the spokesman.

Other aspects of the inquiry were either not divulged or not yet known, including who fired gunshots into the SUV’s windshield and how the vehicle crashed into a concrete barrier and wound up facing oncoming traffic headed into a parking lot.

Authorities said they do not believe any of the people injured were struck by bullets. In addition to the hospitalized driver, whose condition officials did not reveal, an NSA police officer and a bystander were hurt, although not seriously.

Those injuries occurred shortly before 7 a.m. during a confrontation at a visitors gate to the sprawling listening post on Fort George G. Meade, off the Baltimore Washington Parkway and Md. Route 32. Television images showed a black SUV with bullet holes in its windshield.

Gordon Johnson, the special agent in charge of the FBI’s Baltimore field office, said that “preliminarily, gunfire was directed at the vehicle.” He declined to say whether any NSA police officers fired at the SUV. Fitz said authorities ran the names of the vehicle’s three occupants through databases and came up with no link to terrorism.

Johnson said agents were interviewing the occupants and searching the SUV. “This is part of our investigation, to understand what happened here today,” he said. “We are trying to talk to them to find out why they were here.”

It is not uncommon for motorists to take an exit in error from the parkway and end up at the NSA. A brown sign at the exit, similar to those used to mark national parks, says “NSA” and has an arrow pointing up the ramp to the site. Below the “NSA,” in large type, the sign states “Restricted Entrance.”

Most drivers who wrongly take the exit are turned back by heavily armed police. In March 2015, a 27-year-old man died after the stolen SUV he was in crashed outside the NSA. Ricky S. Hall was one of two men whom police fired on as the vehicle hit a police cruiser before he made it onto the NSA campus.

Officials in that incident said the driver may have mistakenly taken a restricted exit to an NSA security post and ignored police orders to stop, possibly because there were drugs inside the SUV and the occupants had just left a motel and the vehicle’s owner, who had picked them up in Baltimore for an overnight tryst.

Johnson told reporters that the origins of Wednesday’s incident remain unclear. The SUV was pointed against the flow of traffic into an entry gate lined with vehicles waiting for clearance to reach the parking lot. The SUV ended up against a fence after crashing into a white concrete Jersey barrier — labeled “NSA” — that had been knocked askew by several feet.

It appeared from television video that the passenger-side air bag in the SUV had deployed, and several bullet holes were in the windshield. Fitz, the FBI spokesman, said the SUV “came on campus and tried to leave.”

At least one person was seen in handcuffs shortly after the incident ended.

Ellen Nakashima contributed to this report.