A former head of the police union for District youth corrections officers pleaded guilty Thursday to stealing more than $180,000 in union dues over nearly three years before board members discovered their bank account had only $277 left in December 2015.

Corrections officer Takisha Brown Dorsey pleaded guilty to one count of wire fraud and faces a statutory maximum of 20 years in prison before U.S. District Judge Reggie B. Walton of the District.

“I knew what I was doing was wrong,” Dorsey said in an hour-long hearing. “I had the ability to stop.”

Union funds generally went to pay for legal representation for 240 union members, whose dues amounted to $106,000 in bank deposits in 2015 alone, federal prosecutors said.

In a deal with prosecutors, both sides agreed federal guidelines call for a 15- to 21-month prison term, although Walton could hand down a greater or lesser penalty at sentencing June 1. Dorsey also agreed to pay back $183,590 in unauthorized withdrawals that she funneled for her own use.

“Someone devious enough to steal from their own union is not trustworthy. . . . My inclination is to lock you up, but I’ll give you the benefit of the doubt” for now, Walton said, releasing Dorsey until sentencing.

“I don’t know what I’ll do,” Walton added but said prison was a possibility: “Prepare yourself for that potential reality.”

Dorsey “was able to conceal her embezzlement and fraud” largely because she served as chair of the Fraternal Order of Police union for the D.C. Department of Youth Rehabilitation Services from January 2012 to December 2015, Assistant U.S. Attorney Kendra D. Briggs wrote in charging documents.

Dorsey as union chair had sole access to the union’s ATM card, and in February 2014 removed a requirement that a second official’s signature was required for check withdrawals, Briggs said.

Between April 2013 and December 2015, Dorsey exploited her position and withdrew the money to her own bank account and “for her own purposes and financial benefit,” Briggs said.