Chief Chell’s departure makes sense given the uncertainty hanging over the future of the department’s top brass, said Jillian Snider, a retired police officer who lectures at John Jay College of Criminal Justice.

If Mr. Mamdani wins, she said, he is likely to undertake “a dramatic overhaul of the executive leadership of the department.”

“Chief Chell is of the old-school mentality,” Ms. Snider said. “If I was in the position of Chief Chell, I would want to go out on my own terms.”