Authorities investigate a shooting incident Tuesday afternoon on the Intercounty Connector. (Dan Morse/The Washington Post)

The FBI said early Wednesday that a suspect was being held in connection with separate incidents involving shots fired Tuesday at a National Security Agency building and into traffic along the Intercounty Connector in Maryland.

Amy Thoreson, the spokeswoman for the FBI’s Baltimore office, also said the bureau thought that the same man had been involved in other incidents of gunfire at sites around the Baltimore and Washington area in recent days.

The man was not identified and it was unclear what led to his detention.

“We believe the subject responsible for shooting incidents on the ICC, near Fort Meade Army installation and other locations around the Baltimore-Washington metro area in the last two weeks is in custody,” Thoreson said in a brief statement.

She said no other information was available immediately.

Police in Anne Arundel County posted a video Wednesday on its Facebook page showing a car that was allegedly involved in a shooting at Arundel Mills mall. The suspect also is believed to be involved in shootings at a National Security Agency building and into traffic on the Intercounty Connector in Maryland. (Video courtesy Anne Arundel County Police)

In the first of the Tuesday incidents, a truck was shot at at while on the connector road. The gunfire on or near the NSA campus came several hours later.

In the immediate aftermath of the two events, nothing appeared to create a solid link between the incidents, although suspicions were raised. No one was seriously injured.

The Baltimore office of the FBI said Tuesday night that it was taking the lead in the investigation of the NSA incident because it was a federal installation.

The first incident began about 2:40 p.m., when the window of a truck traveling east on the ICC near Interstate 95 in Prince George’s County was struck by gunfire, authorities said. The shot may have been fired from woods nearby.

One man in the truck was bruised by a bullet fragment that was blocked by his clothing; the other man was cut in the face by shards of glass, said Lt. Kevin Ayd of the Maryland Transportation Authority Police. Both were sent to a hospital with injuries that did not appear life-threatening.

Police do not know of any motive and had no information about the shooter, Ayd said. They indicated that they did not know whether anyone had intentionally fired at the moving vehicles.

“We’re going to do our best to find out what happened,” Ayd said.

Prince George’s police took over the investigation and were canvassing the area Tuesday afternoon to determine where the gunfire may have come from, said Lt. Jarriel Jordan, a spokesman for the department.

The victims work for Nelson Tree Specialist and were traveling in one of the company’s trucks, said Gary Cooper, an employee of the landscaping business.

“They were just driving down the road and got shot,” said Cooper, who was on his way to visit the victims at a hospital. “It certainly makes you wonder.”

About 12 miles away the same afternoon, gunshots struck a building at the NSA campus in Anne Arundel County, a U.S. Park Police spokeswoman said.

The Park Police said no injuries were reported, and police initially said they had no information about who might have fired at the building, which is in Fort Meade, Md.

Julie Parker, a spokeswoman for Prince George’s police, said Tuesday that detectives investigating the shooting of the truck were “monitoring the incident in Anne Arundel County but not linking the two at this time.”

Lynh Bui and Matt Zapotosky contributed to this report.