The Patrolmen’s Benevolent Association—representing the NYPD’s 23,000 “white shield” police officers—made the maximum permissible contribution to an eccentric conservative Democrat challenging Mayor Bill de Blasio in the September primary, according to the latest financial reports filed with the city’s Campaign Finance Board.

The union, led by the strident Patrick Lynch, was one of only two donors to give the full $4,950 to Queens State Senator Tony Avella‘s dark horse candidacy for Gracie Mansion. Lynch and his labor organization have long been at odds with de Blasio, particularly over the liberal mayor’s close ties to Rev. Al Sharpton, his allegations of systemic racism in American policing, his opposition to more generous raises and disability benefits for rank-and-file cops and his public recollection of warning his half-African-American son Dante about the dangers officers might pose.

After the racially inspired killing of Officers Wenjian Liu and Rafael Ramos in late 2014, the PBA president claimed the mayor had “blood on the hands.” He later defended the cops who turned their backs on de Blasio at the fallen patrolmen’s funerals.

Nonetheless, the longtime foes reached a long-awaited contract agreement on January 31, after months of Lynch and his members picketing outside de Blasio’s public speaking engagements and at the Park Slope YMCA during the mayor’s weekday workouts.

The records Avella submitted to the CFB date the PBA contribution to February 4, and an Avella campaign spokesperson confirmed that the check from the union was dated January 30.

The PBA has retained the publicity and consulting services of Bradley Tusk, a former aide to ex-Mayor Michael Bloomberg and the founder of NYC Deserves Better, an anti-de Blasio group. A representative of Tusk Strategies reached out via social media to downplay the donation, and to indicate that the union would not likely endorse Avella.

The Blasio team declined to remark on the contribution.

Avella raised a mere $34,129 over the most recent two-month filing period—less than one-tenth of the incumbent’s $394,495. De Blasio’s other longshot challenger, former Brooklyn City Councilman Sal Albanese, amassed $24,285.

Both Avella and Albanese have unsuccessfully sought the Democratic nomination in election cycles past, and neither has made much of an impression in public opinion polling on the current race. The two outerborough politicians largely appeal to a predominantly white, middle-class, right-leaning constituency that makes up a minority of Democratic voters and of the city electorate as a whole.

The two de Blasio rivals each hail from neighborhoods with sizable population of current and retired police officers, and Lynch himself lives in Avella’s district. The state senator is part of the eight-member Independent Democratic Caucus, a breakaway faction that enjoys a power sharing pact with the GOP in the upper chamber of the State Legislature.

The PBA’s new contract is largely retroactive, covering past years when it had no agreement with the city at all, and the deal will expire at the end of July—meaning the union and the mayor’s administration will soon have to return to the bargaining table.

Updated to include clarification and comment from the Avella campaign and Tusk Strategies.