A former DeKalb County police officer pleaded guilty Tuesday to taking bribes, but avoided prison time as part of a plea deal.

Brandon Brown, 28, pleaded guilty to two counts of violation of oath by a public official and one count of simple battery for soliciting bribes in August 2013 at a Ethiopian restaurant and hookah bar, where he worked part-time. Brown accepted money in exchange for not issuing a citation to a customer who was smoking marijuana, according to investigators.

Brown, who had been with the department since 2010, resigned to avoid being fired after being reported to police. He admitted to police internal affairs investigators in a recorded interview that he told the smoker he wanted $50.

“What I’ve done was wrong,” he said.

“This officer sold his badge for a $50 bribe,” DeKalb County District Attorney Robert James said.

Brown was indicted in April and returned to court Tuesday to enter his guilty plea. He was sentenced to three years' probation and was not granted first-offender status, which would have allowed his conviction to be removed after completing probation, Channel 2 Action News reported.

“The main focus of this was ensuring that this individual never wore the badge again,” James told Channel 2.