Correction: An earlier version of this story incorrectly identified one of the locations where the suspect fired at D.C. police as Third and K streets NW. The location was the 1200 block of Third Street NE, police said. This version has been corrected.

A security guard was killed in a shooting at the Census Bureau’s headquarters in Suitland on Thursday evening in an incident that authorities said began with an abduction in the District and ended with the suspect shot on H Street NE after a dramatic chase and shootout.

The chaotic events spanned at least two hours and more than 15 miles, police said, beginning with an apparent domestic abduction in Northeast Washington. Violence erupted at the Census Bureau campus, where employees reported hearing gunshots and were blocked in by dozens of law enforcement vehicles, and the situation came to a wild finish in the busy H Street corridor, where at least 15 police cars appeared among the bars and restaurants and closed down traffic to confront the suspect.

“One moment, we are eating tandoori chicken, and the next we are on the floor,” said Roberta Shapiro, who was dining with her husband and friends at Cusbah near 12th and H streets NE. “All of a sudden there were blue lights everywhere. It was like police cars were dropping out of the sky, there were so many.”

The incident began at about 5:30 p.m. at Third and T streets NE, where D.C. Police Chief Cathy L. Lanier said a man forced a woman into a green Honda. Police believe the two know each other.

Shortly after that, the couple were seen arguing in the car outside a gate at the Census Bureau campus on Silver Hill Road in Prince George’s County, Lanier said. A guard approached the car and was shot several times, she said.

Next, Lanier said, the suspect shot at a D.C. police cruiser on Bruce Place SE. Police gave chase, and in the 1200 block of Third Street NE, the suspect fired again, she said. When he approached the H Street commercial corridor, police rammed his car. The suspect got out and opened fire, and officers fired back to bring the incident to a close, the chief said.

The guard at the Census Bureau, Lawrence Buckner, died at Prince George’s Hospital Center at 7:19 p.m., hospital Erika Murray said.

Lanier said late Thursday that the last she had heard, the suspect was alive. She said the woman, who was able to get out of the car somewhere between the Census Bureau’s campus and H Street, was located and was “in good condition.”

Lanier also said a D.C. police sergeant was hit in the leg, but she did not describe his condition. She said the suspect was conscious when he was carried from the scene. Several other law enforcement officials said he was shot in the head.

FBI spokeswoman Amy Thoreson said shortly before 9 p.m. that the H Street incident “ended” the Suitland situation, and a loudspeaker at the Census Bureau headquarters announced the all-clear.

Thoreson said the incident was not linked to terrorism. Two government sources said police told them that the shooting was probably domestic in nature.

It was unclear how many workers were still at the complex at the end of the business day.

Donna Millhouse, an administrative assistant, said she was just getting off work at 6:30 p.m. when she heard that her building was on lockdown. She and her co-workers hunkered down, keeping abreast of the situation through social media and loudspeaker announcements.

“Everybody was calm or trying to keep everybody else calm,” she said.

Nelson Ukaegbu, a guard at the complex, saw the aftermath of the shooting on video from the command center where he was stationed. He saw another guard administering CPR to the injured man as employees in the command center rushed to call local and federal law enforcement.

Ukaegbu was upset by the injury to his colleague. “I’m feeling so sad. It is just so sad,” he said.

Print shop owner Mario Exum, who could see directly into the complex from his store across the street, was loading up a car, he said, when he remarked to employees that he smelled “gunfire.” Exum is a former military and law enforcement officer.

He said he saw a black vehicle speeding down a service road. He couldn’t tell whether it was a security vehicle or the suspect’s.

Exum went back into his shop, and when he emerged, the campus was swarming with police vehicles. About two dozen military-clad officers with rifles entered the campus and began a sweep of parking garages and lots. It was unclear which police agency the officers represented.

At about the same time, an announcement could be heard on the campus loudspeaker alerting people to a “security-related incident.” The announcement said law enforcement officers would be conducting a car-by-car search of vehicles on the property.

The U.S. Bureau of Alcohol, Tobacco, Firearms and Explosives confirmed that agents were on the scene but declined to elaborate.

At that time, Census Bureau spokesman Michael Cook said employees inside the complex, which houses the Census Bureau’s headquarters and other federal agencies, could not leave the campus because all entrances had been shut down by law enforcement officers.

Shapiro, the eyewitness at the H Street restaurant, said she was close to the front windows and saw the police car crash into the vehicle, then heard gunfire. “We ducked under the table. I can tell you, they have very clean floors.”

She and her party stayed down until police came in and asked whether anyone had seen what had happened.

Shapiro said she saw an injured officer being taken to an ambulance but “high-fiving the others near him as he was being carried off, so he seemed in good spirits.”

Shapiro, who grew up in Chicago, said, “I consider myself pretty urban, but this was unique.”

The group finished dinner as the conversation turned to how many shots people throughout the restaurant thought they had heard. “It was a stunning night.”

Lynh Bui, Aaron C. Davis, Joe Heim, Peter Hermann, Arelis R. Hernandez, Dan Morse and Matt Zapotosky contributed to this report.