WORCESTER — A federal appeals court has ruled that the city can continue to enforce its panhandling ordinance while a lawsuit is being pursued by its opponents.

The U.S. Court of Appeals for the First Circuit last week affirmed the district court's decision to deny a preliminary injunction on the case, with the exception of one provision of the ordinance that bans panhandling at night. The court ruled in November that the city can't restrict nighttime panhandling.

In early 2013, the City Council voted in favor of panhandling restrictions that would prevent people from asking for money while walking between vehicles at intersections. The restrictions put a stop to "tag days" in which nonprofit organizations and sports teams also collected money from drivers.

A violation can result in a fine of up to $50 or community service.

"The city's not against panhandlers because they're poor," City Solicitor David M. Moore said. "We're trying to prevent dangerous situations or injuries."

The American Civil Liberties Union of Massachusetts and Goodwin Procter LLP are representing Robert Thayer and Sharon Brownson, who identify as homeless Worcester residents, as well as Worcester School Committee member Tracy Novick.

They have argued the ordinance is unconstitutional and impedes the First Amendment.

However, the ruling, which was written by former U.S. Supreme Court associate justice David H. Souter, argued that is not the case.

"Girl Scout cookie sellers and Salvation Army bell-ringers are as much subject to the Aggressive Panhandling Ordinance as the homeless panhandler," Mr. Souter wrote. "While it will unquestionably limit political campaigning, it draws no line by party or position or cause, and it covers solicitation for money as well as for votes."

ACLU lawyer Sarah Wunsch described the appeals court ruling as "flawed" and said her organization will wait on another court decision before moving forward.

"The decision and case is likely to be affected by the Massachusetts buffer zone law," which will be decided in U.S. Supreme Court over the next week or so, she said. While that ruling is affecting a handful of abortion clinics around the state, she said, "Worcester has created a buffer zone around hundreds of places."

Ms. Wunsch added that one option for the ACLU will be asking for a review by the full First Circuit Court of Appeals rather than sticking with the conclusion made by three of the judges.