A U.S. Customs and Border Protection officer tasked with intercepting drugs was indicted on federal charges after authorities found nearly 18 kilograms of cocaine in his carry-on luggage at Hartsfield-Jackson International Airport, prosecutors said.

Ivan Van Beverhoudt, who was stationed in the U.S. Virgin Islands, was arrested in January after stopping in Atlanta on his way to Baltimore, the Department of Justice said Tuesday in a news release.

At the time, the 40-year-old was carrying his government-issued weapon, which allowed him to bypass normal airport screening, authorities said. When he landed in Atlanta, CPB officers inspected the passengers on his flight with a K-9 unit. The dog alerted its handler to Van Beverhoudt’s two carry-on bags.

Back in St. Thomas, one of his duties was to inspect flights and prevent the movement of controlled substances on airplanes, federal prosecutors said.

RELATED: Atlanta airport customs officers stop 4 cocaine smuggling attempts, seize 20 pounds

In an interview room at the Atlanta airport, the customs agent claimed he was traveling to Maryland to meet a doctor, though “he could not identify the doctor or explain how the doctor would see him on the weekend and without a medical appointment,” prosecutors said.

Authorities searched his bags and discovered 14 packages of cocaine in one and two more in the other, totaling 17.8 kilograms, according to the release.

“A badge and a gun should be used for protecting the public, not for bypassing security to enable criminal activity,” said Special Agent Robert Hammer, who oversees Homeland Security Inspection operations in Georgia and Alabama. “Corruption in law enforcement undermines the public’s trust and makes all of our jobs harder.”

Van Beverhoudt was indicted last month on charges of importing cocaine, possession of cocaine with intent to distribute and possession of a firearm in furtherance of drug trafficking.

In other news: 

The changes include hiring freeze