Mr. Williams and Mr. Foy were trying to walk from Grand Army Plaza to a post-parade event at the Brooklyn Museum, using a sidewalk that the police had blocked. According to Mr. de Blasio, who said he had spoken to Mr. Foy about the episode, they had been given permission to use the sidewalk by a police officer wearing the kind of white shirt usually worn by an officer of high rank.

But as the two men continued walking down the sidewalk, they found themselves surrounded by uniformed police officers stationed farther along.

“Jumaane was wearing a council member’s pin, they were trying to explain who they were, but the officers weren’t listening,” Mr. de Blasio said in an interview.

Mr. de Blasio said that Mr. Williams began to argue with the officers and that at some point he and Mr. Foy were both thrown to the ground and handcuffed. They were taken to the Union Temple, a synagogue on Eastern Parkway, where Mr. de Blasio said he went after getting the call. There, Mr. de Blasio said, he spoke to a police commander, who released Mr. Williams and Mr. Foy after about 30 minutes without filing charges.

“It’s broad daylight, they get thrown to the ground, they both get arrested,” Mr. de Blasio said. “If that’s what happens to an elected official and a senior appointee, imagine what happens to a general member of the public.”

Mr. Williams did not answer requests for comment. His spokesman, Stefan Ringel, said the councilman would address the case on Tuesday, at a news conference on the steps of City Hall.