A Georgia man tried to dump more than half a pound of pot inside a prison using a remote-controlled drone, federal prosecutors said.

Eric Lee Brown, 35, of Lithonia, pleaded guilty on Thursday to using a DJI Phantom 4 drone to fly 294 grams of marijuana into medium-security Autry State Prison in Pelham in March 2018, according to the US Attorney’s Office for the Middle District of Georgia.

Deputies in Mitchell County caught on to the ploy after confronting Brown for blocking traffic near the prison. Upon searching his car, officers uncovered the drone and two clear plastic bags packed with pot, prosecutors said.

A search warrant obtained by investigators later revealed detailed conversations Brown had about using the drone to drop the drugs inside the prison’s perimeter.

The drone was not registered, and Brown did not have a valid Remote Pilot Certificate issued by the FAA — both of which are legally required.

The conviction is believed to be the first criminal prosecution under a drone registration law, corrections officials said.

Brown faces a maximum sentence of five years in prison, a $250,000 fine and three years of probation.