A federal appeals court on Wednesday allowed a New York law barring the carrying of guns in some public places to stay in effect, granting a request from the state’s attorney general, who is fighting to keep the law in place a week after a judge blocked large portions of it.

The decision from the U.S. Court of Appeals for the Second Circuit allows the state more time to enforce a measure intended to limit the carrying of guns in public places, as a three-judge panel weighs a request to keep the law in place for a longer time.

The decision continues what will likely be a lengthy series of tests for the measure, which was put into place in July in response to a Supreme Court decision the previous month. The law is already being defended in two federal courts, even as several other suits against it progress.

“There is going to be so much litigation on the Second Amendment over the coming months,” said Eric Ruben, a law professor at Southern Methodist University in Dallas who specializes in gun regulation. “In New York and across the country.”

The Supreme Court’s decision struck down a century-old New York law that had prevented anyone who did not have a heightened need for self-defense from carrying guns in public. The justices ruled that the law unfairly prohibited New Yorkers from exercising their Second Amendment right to bear arms.

During an emergency session in Albany, legislators passed the new law, which set out a lengthy list of places in which the carrying of guns would be barred, including stadiums, bars, public transit and Times Square. The Supreme Court acknowledged that placing certain sensitive locations off-limits to guns would be acceptable, though it provided limited guidance to lower courts about how to assess them.

Under New York’s new law, all private property is off limits to guns unless the property owner explicitly specifies otherwise. In addition, those who wish to carry in public have to pass a character test and undergo 18 hours of firearms training, among other requirements.

The new law was challenged almost immediately by the advocacy organization Gun Owners of America, and after a first suit failed, a second brought by six of the organization’s New York members succeeded. On Thursday, Glenn T. Suddaby, a federal judge in New York’s Northern District, wrote that much of the new measure was not permissible because, like the previous law, it infringed upon New Yorkers’ rights.

Judge Suddaby said that the state could not ban guns from many of the sensitive locations it had designated, including Times Square, public transit, libraries, playgrounds and public parks. He also found that private property could not be declared off limits by default and that the character test was unconstitutional. He allowed some parts of the law to stand, including the training requirement.

The judge had granted New York three business days before his order would have gone into effect and on Monday, Attorney General Letitia James appealed to the Second Circuit. She argued that the court’s ruling had been improper, and asked that his order be stayed as the case continues.

The appeals court granted the lesser of Ms. James’s requests, for a temporary administrative stay and referred her other request — that Judge Suddaby’s order be stayed until her office could appeal it at length — to a three-judge panel that decides motions. The full gun law will remain in effect at least until that panel decides on the merits of Ms. James’s motion.