A private security guard fatally shot a man wielding a knife around lunchtime Friday in a busy area of Union Station, according to police, and panicked travelers and diners fled or took shelter in shops that quickly locked their doors.

Authorities said the man refused to drop the knife and threatened the guard near a McDonald’s restaurant and several Amtrak gates. Police said the guard had seen the man, who was not immediately identified, stab a woman outside the station. Police said the guard chased him about 50 feet through a breezeway to where the confrontation occurred about 12:45 p.m.

The man and the woman were taken to hospitals. Authorities initially said that both suffered injuries not believed to be life-threatening, but later in the afternoon, the man who was shot died, according to a police spokesman. The woman’s condition was not released. Police said that they knew each other and that the incident seemed to be a result of a domestic dispute. Their relationship was not immediately clear.

Coming on the 14th anniversary of the Sept. 11 terrorist attacks, the sound of gunfire in the crowded, cavernous Beaux-Arts-style rail station on Massachusetts Avenue in Northeast Washington sparked fears of a gunman roaming the building. D.C. police quickly tweeted: “There is NOT an active shooter situation.”

But because of the heightened security around the Sept. 11 anniversary, police from several agencies were on duty at the station, which is used every day by thousands of tourists and workers who take Metro, Amtrak, buses and commuter trains linking Maryland and Virginia.

Amtrak’s police chief said the station was evacuated and train service was briefly suspended.

“It was like a movie — people running out,” said Alex Cucciniello, 18, a Catholic University freshman who was near the shooting at Gate J. “I turned away, then heard pop, pop, pop. I heard the cop yelling at this guy to stand down.”

Several people described hearing more than one shot, although police said the guard, who was not identified, fired only once. The investigation was continuing Friday evening.

Antoinette Pullman, a manager at the Pepper Palace on the mezzanine level, heard someone yell, “He has a gun!” followed by two shots. Pullman said there were five customers in the store. She turned off the lights and told everyone to get on the floor. “It was chaos,” she said.

At the Union General store above the McDonald’s, employee Noelle Nealy, 27, heard a gunshot, looked outside and saw people running away from the fast-food restaurant.

“We locked our store down and hid inside,” Nealy said. “Once they evacuated us, we were running out and saw police swarming with guns drawn.”

Her co-worker Alexis Butt, 22, was at Shake Shack getting food before her 1:30 p.m. shift when the shooting occurred. “A lady came in and screamed, ‘Everyone needs to get out of here!’ ” Butt said. “Then, as we were running, someone shouted, ‘Someone got shot!’ and everyone started running faster.”

People were kept out of the station for about 30 minutes, although even after they returned, they were barred from the area around the McDonald’s, which remained closed for the police investigation. But elsewhere, the routine quickly returned to normal, with trains moving, diners resuming lunch and shoppers browsing in stores.

Polly Hanson, chief of Amtrak police, said the stabbing occurred at the entrance to Kaiser Permanente and the Securities and Exchange Commission, which share a building that is connected to Union Station by a breezeway.

Police did not detail the confrontation between the armed guard and the man.

D.C. Police Cmdr. Jeff L. Brown would say only that the man refused to drop the knife, the guard felt threatened and that he fired once. He said the guard is a contract employee with the SEC.

A spokeswoman for the SEC declined to comment, referring questions to the security company, First Coast Security, based in Jacksonville, Fla.

A.J. Romano, vice president for government services, confirmed that his company contracts with the SEC but declined to discuss the shooting.

Hanson, the Amtrak police chief, praised people for taking shelter or quickly leaving the station. She said there was a sense of urgency but no stampede. “They did hear a gunshot, and that’s the right thing to do,” she said.

Colby Moore, 22, works near Union Station and was grabbing lunch at Chipotle when he heard a loud noise and commotion upstairs. He initially thought that it was middle-school students joking around, but then he saw people running upstairs, and everyone in the downstairs food court started to panic.

“I think the fact that it was September 11 probably didn’t help in keeping people calm,” Moore said. “I didn’t have time to think about it. I was trying to get out of there as fast as I could. I sprinted the entire length of the food court.”

Moore ultimately left through a door that leads to the Metro station. Outside, he said, there was a swarm of unmarked and marked police cars, and police appeared to already have the station on lockdown.

At Union Station, carrying a bag on his shoulder and wearing a crisp, blue shirt, was former Republican congressman Jim Gerlach of Pennsylvania, another low-key commuter watching the police and dogs stream by.

“It’s disturbing to see violence anywhere, especially here,” he said.

“I’ve been coming in and out of here for 13 years, and this isn’t that kind of place. It’s a place where travelers come and go, going about their business,” he added.

Keith L. Alexander, Fenit Nirappil, Perry Stein and Julie Zauzmer contributed to this report.