Several people were hospitalized after a shooting Wednesday morning outside the National Security Agency campus at Fort Meade, Md., although the spy agency says none of the injuries was caused by gunfire.

The incident began Wednesday when a vehicle tried to enter the agency's secure campus without authorization shortly after 7 a.m., the NSA said in a statement. It said weapons were fired but "preliminary reports do not presently indicate that there are injuries attributable to gunfire."

The FBI is investigating.

The incident did not have any links to terrorism, said a federal official who did not want to be named because the person was not authorized to speak publicly.

Images from local news outlets showed authorities surrounding two handcuffed people after a black SUV ran into a barrier outside the Maryland base, which is about 48 kilometres northeast of Washington.

Earlier, Fort Meade garrison spokesperson Cheryl Phillips had said one person was wounded in the shooting and taken to a hospital.

"NSA police and local law enforcement are addressing an incident that took place this morning at one of NSA's secure vehicle entry gates. The situation is under control and there's no ongoing security or safety threat," an earlier NSA statement said.

NSA Police and local law enforcement are addressing an incident that took place this morning at one of NSA's secure vehicle entry gates. The situation is under control and there is no ongoing security or safety threat. —@NSAGov

U.S. President Donald Trump has been "briefed on the shooting at Ft. Meade," spokesperson Lindsay Walters said.

An image taken from a WRC-TV helicopter shows the police and fire department response outside the facility. WRC said bullet holes could be seen in the vehicle's front window, and air bags were deployed. Blood-stained material could be seen on the ground.

The NSA is one of the U.S. government's main spy agencies. It focuses on using technological tools, including the monitoring of internet traffic, to monitor the government's adversaries.

After the shooting, authorities closed a major highway in both directions, causing major backups throughout the area during rush hour.

Despite prominent highway signs, drivers occasionally take the wrong exit and end up at the tightly secured gates. Most motorists then carefully follow the orders of heavily armed federal officers and turn around without getting into more trouble.