A fired dishwasher shot and killed a chef and held a person hostage for about three hours before he was shot by police at a crowded restaurant in a tourist-heavy area of downtown Charleston on Thursday, authorities and one of the restaurant’s owners said.

The hostage was freed with no injuries, Mayor John Tecklenburg said. The shooting took place at Virginia’s restaurant on the usually crowded King Street, a line of shops and nice dining that caters to both tourists and residents in South Carolina’s largest and most historic city.

Mr. Tecklenburg quickly said the shooting was “the act of a disgruntled employee” and not a terrorist attack or a hate crime in a city where nine black church members were killed by a white man two years ago.

“This was a tragic case of a disturbed individual, I think, with a history of some mental health challenges,” Mr. Tecklenburg said at a news conference.

Authorities did not release the names of the gunman or the employee he killed. They initially said they believed there were “a couple” or a “small number” of hostages.

The shooting was reported shortly after noon Thursday.

Peter Siegert, 73, and his son Peter Siegert IV, 45, were quoted by The Post and Courier of Charleston as saying that just after several waitresses and kitchen workers walked out the door without saying a word, a man in an apron with a gun came out of the kitchen and locked the front door.

“’I am the new king of Charleston,’” the Siegerts quoted the man as saying.

The man told diners to get on the floor and move to the back of the restaurant. The Siegerts said they escaped out a back door and didn’t know how many people were left behind.

One of the restaurant’s owners, John Aquino, told WCSC-TV that a dishwasher who had been fired came back to the restaurant and shot a chef to get revenge.

The restaurant was packed with a lunchtime crowd and the first officers to arrive were able to get the man who was shot and a number of diners out safely, interim Charleston Police Chief Jerome Taylor said.

The site is a few blocks away from Emanuel AME church, where nine black members of a church were killed by a white man during a June 2015 Bible study. Dylann Roof was sentenced to death in the case.

It is also just several blocks from where more than 100 cruise ships dock in Charleston each year.