Three people were taken into custody Wednesday morning after a black SUV attempted to enter the National Security Agency campus in Maryland without authorization. The incident ended with the bullet-riddled vehicle being stopped by barriers outside the gate, officials said.

The three taken into custody were passengers in the SUV when it attempted to make its way onto the NSA compound just after 7 a.m., Gordon Johnson, Special Agent in Charge at the FBI Baltimore Office, said in an afternoon news conference.

The SUV, which had a New York license plate, appeared to be a rental car, Johnson said. He added that the incident was not linked to terrorism and there's an ongoing investigation.

An NSA police officer and a civilian in the area were injured and taken to the hospital. One of the passengers in the SUV was also injured and hospitalized. The conditions of those injured were not released, though Johnson said it appeared the injuries were not gunshot-related.

“Weapons were discharged in the course of the incident, which remains under investigation at this time,” the NSA said in an earlier statement.

The shooting occurred at the visitors gate off Route 32 at the U.S. military installation. The highway was quickly closed off in both directions as police responded to the incident.

Video from the scene showed an SUV riddled with bullets, the vehicle's airbags deployed and bloodied items on the ground. The SUV also appeared to have crashed into a white barrier.

President Trump was briefed on the situation, White House spokeswoman Lindsay Walters said.

"The president has been briefed on the shooting at Fort Meade. Our thoughts and prayers are with everyone that has been affected. We will continue to provide updates as they become available," Walters said.

Fox News' Jake Gibson, Griff Jenkins and The Associated Press contributed to this report.