An effort by New York City to charge a nonprofit bicycling group nearly $1 million for the cost of policing its annual citywide bike tour appeared to be in jeopardy on Wednesday, when a judge seemed unpersuaded by the city’s arguments.

The city contended that the Five Boro Bike Tour, scheduled for May 5, should be considered a noncharitable athletic parade, which is subject to traffic-control fees from the Police Department under new city rules.

But Justice Margaret A. Chan of State Supreme Court in Manhattan appeared doubtful about the city’s arguments, which centered on whether the bicycle tour is a charitable event and the fee paid by its 32,000 participants.

The tour’s organizer, Bike New York, was the first to bring a court challenge to the application of a 2011 rule change that was aimed at defraying the high costs of traffic control during popular events, including the New York City Marathon, according to the city’s Law Department.