BANGKOK — A gunman who fired multiple rounds toward people in Bangkok was arrested on Friday after a standoff, in an incident that alarmed a country still grieving after Thailand’s deadliest mass shooting.

There were no injuries or deaths in the shooting, which began in the early morning hours when the man, whom the police identified to local news media as Ekkachai Charueksilp, began firing shots from his home above a sports equipment store in a central Bangkok neighborhood.

The gunman fired at least 20 shots, leading to the six-hour standoff with police officers on a street cordoned off to the public. The standoff ended after the police asked for help from the man’s relatives and sent a team in to mediate with the gunman.

The gunman eventually surrendered and was being questioned about his motives, said Colonel Krissana Pattanacharoen, a spokesman for the Royal Thai Police.