A government contractor and a journalist from Washington, D.C. used a work-issued computer to hatch a plan to smuggle an array of drugs onto a cruise ship and sell them to passengers, police said.

Peter Melendez, 35, and Robert Koehler, 27, were busted by federal agents on Sunday as they tried to board Royal Caribbean’s Allure of the Seas, which had been chartered by Atlantis Vents for its annual gay cruise in the Caribbean, Chesapeake Today reported.

According to an arrest report, a Homeland Security special agent intercepted emails from Melendez’s computer in which the two men discussed their strategy to smuggle the drugs onto the ship and distribute them once they were on board.

COAST GUARD SEIZES 35,000 POUNDS OF COCAINE IN PACIFIC, OFFICIALS SAY

Miami-Dade police were notified by federal agents about Melendez and Koehler’s alleged plans.

While trying to board the ship in Port Miami, a K-9 doing a routine check of passengers alerted its handler to the two men’s luggage, the Miami Herald reported.

Inside, police said they found an array of drugs, including 27 grams of MDMA, more commonly known as ecstasy, 18 grams of ketamine, quantities of Viagra and Adderall and 246 grams of the date-rape drug GHB.

Police said both men admitted transporting drugs when interviewed, the Herald reported.

Melendez’s Facebook page said he is a “jack of all trades” at the Pentagon, while Koehler works as a news production specialist at the Associated Press, according to his Facebook and LinkedIn pages.

CLICK HERE TO GET THE FOX NEWS APP

Melendez was charged with conspiracy to traffic illegal drugs and trafficking illegal drugs and Koehler was charged with trafficking illegal drugs.