A Dunwoody man who authorities say tried to impersonate a DEA agent has pleaded guilty to being a felon in possession of a firearm.

When Daniel Harbison, 40, unwittingly pulled over an off-duty Doraville police corporal driving a Chevrolet Suburban for a traffic stop on April 3, he carried a .45 caliber handgun in a thigh holster, authorities said.

Harbison was arraigned on federal charges of being a felon in possession of a firearm. Authorities said he had previously been convicted of a felony and could not legally possess a gun.

He pleaded guilty Tuesday and is to be sentenced on Aug. 27 in U.S. District Court.

At the traffic stop, Harbison wore a T-shirt bearing the letters DEA, had an ID card that appeared to be issued by the DEA, and had a realistic-looking gold and blue badge embossed with the letters “US,” acting U.S. attorney John Horn said.

The Doraville officer asked Harbison why the LED lights he flashed when making the stop were green and white instead of the standard police blue and white lights, authorities said, and Harbison allegedly said it was because he was a federal officer. The Doraville officer then said other police were on their way to the scene to see if Harbison was really law enforcement, at which time he got back in his car and drove off, Horn said.

At Harbison’s home, police found a .45 caliber handgun, a DEA T-shirt, LED lights, an identification card purportedly issued by the DEA, and a gold and blue engraved “US” badge, Horn said, and he was arrested.

Harbison had been impersonating a federal agent for several weeks before he was caught, authorities said.