Mr. Fusco, a high-ranking association official and a former ally of Mr. Lynch, called it a hard-fought race. “The members of the P.B.A. were able to hear our positions on the critical issues facing police officers,” he said. “The members have spoken, and we respect their decision.”

In a statement, Mr. Wilson thanked his supporters. “Now it’s time for the union to all band together and stand behind Paddy,” he said.

Throughout the campaign, Mr. Lynch, who has led the union since 1999, faced criticism from his challengers over his failure to secure a contract for the 23,000 members of his union who have been working without one since 2010. He was also assailed for not stopping Gov. David A. Paterson from slashing pension benefits for newly hired officers in 2009.

A wily politician given to strategic bursts of outrage, Mr. Lynch alienated some of his members, and much of the public, this winter when he called on the police to sign petitions to keep Mr. de Blasio from attending their funerals if they were killed on the job, and he quietly stood by as his officers engaged in a work slowdown on summonses and quality-of-life arrests.

In January, some of Mr. Fusco’s supporters rose in mutiny against him during an association meeting at a catering hall in Queens, demanding that he drop his fight with the mayor and concentrate instead on the business of the union.