The police said that the child, who was shot in the leg, as well as two other victims, both women, were expected to survive.
A fight among several men in Times Square on Saturday led at least one of them to pull out a gun and open fire, injuring two women and a 4-year-old girl, the police said.
The girl, who was toy shopping with her family, was shot in the leg and expected to survive, as were the two women, a 23-year-old tourist from Rhode Island, who was also shot in the leg, and a 43-year-old from New Jersey, who was shot in the foot, the police said.
The victims, who did not know one another, were taken to Bellevue Hospital Center after the shooting at about 4:55 p.m. near Seventh Avenue and West 45th Street, the police said. The girl was undergoing surgery on Saturday evening, the police said.
“Thankfully these innocent bystanders are in stable condition,” Mayor Bill de Blasio said on Twitter. “The perpetrators of this senseless violence are being tracked down and the NYPD will bring them to justice. The flood of illegal guns into our city must stop.”
Police Commissioner Dermot F. Shea said the police were looking for information about one “person of interest” and believed there was at least one gunman.
He said it was too early in the investigation to say what sort of dispute might have preceded the shooting, although he said it appeared that two to four men had been involved.
“It was instantaneous,” he said of the shooting, adding that an officer nearby had heard four to five shots. No gun was recovered, he said.
By about 6:40 p.m., nearby streets were fully barricaded to traffic and most pedestrians. Shops and restaurants at the center of Times Square, like Starbucks, Gap and Taco Bell, had emptied out.
An eerie silence fell over most of the blocks in the immediate area, interrupted only by conversations among the dozens of officers who stood from 42nd Street up to at least 47th Street.
Most of the initial scenes of confusion and fear that had spread on social media in the minutes after the shooting had dissipated. Times Square was expected to reopen to the public later on Saturday night.
The shooting came amid a rise in gun violence in New York City that has been sustained since early in the pandemic.
At least 463 people have been shot in the city this year, according to police data, up from 239 over the same period in 2019 and 259 in 2020. The city was largely shut down, with fewer pedestrians on the street, at the start of the pandemic last year.
The shooting was a rarity for the immediate area around Times Square. Much of the gun violence has been concentrated elsewhere.
As the city nears a full reopening, some officials have worried that gun violence could make it more difficult to attract visitors.
“It worries you when it happens at somewhere as public as Times Square,” Rosario Duran, 26, said on Saturday.
Ms. Duran had arrived in New York City three days ago from Chicago to visit her sister. She was not in the area during the shooting but said the news was jarring.
“I’m still glad I came,” she said. “I’m just going to be more careful.”
Videos and pictures posted on social media after the shooting showed a helicopter circling above the neighborhood and officers combing through a restaurant. The Broadway show “Come From Away” said on Twitter that “everyone in the Schoenfeld, Golden & Booth theaters are all safe.”
Times Square, famous for its throngs of tourists, had become almost vacant during the pandemic last year. But it has recently started to attract crowds as the city has loosened restrictions, vaccinations have increased and coronavirus case numbers have fallen.