DETROIT (AP) — A Detroit city councilman who was under indictment for federal corruption charges since 2018 has resigned from office and admitted in court Monday to accepting an illegal cash campaign contribution.

Gabe Leland pleaded guilty in Wayne County Circuit Court to misconduct in office and his attorney later announced that Leland also stepped down from his elected post, The Detroit News reported.

“At the time I accepted the cash contribution I knew it was against the law to do so, which makes it misconduct in office,” Leland told Judge Gregory Bill.

Sentencing is scheduled for June 7. Court documents have said the contribution was $7,500.

Monroe County Prosecutor Michael Roehrig said last year that the cash was to influence a vote on certain matters. Roehrig’s office handled the case after the Wayne County prosecutor’s office cited a conflict of interest.

A federal grand jury indicted Leland in 2018 on corruption charges tied to $15,000 in bribes and free auto body work solicited and accepted from a business owner in return for help on a property issue.

Defense attorney Steve Fishman told Bill on Monday that Leland, 38, was expected under an agreement with prosecutors to face no jail time. The separate federal case against him also was expected to be dismissed, Fishman said.

Leland already had announced he would not seek reelection to a third term representing Detroit’s District 7.