A Connecticut man has been convicted of importing cocaine into Charleston’s port after federal agents foiled his plan by using a confidential informant, according to the U.S. Attorney’s Office.

Oscar Baptiste, 40, of East Hartford, Conn., was found guilty Tuesday after a two-day trial in federal court in Charleston. He faces five to 40 years in prison.

Baptiste, originally from Panama, started making plans to import cocaine into the Port of Charleston from Panama in 2010 by contacting a man he knew in the Lowcountry, according to federal prosecutors. That person contacted police and became a confidential informant.

“The person he reached out to was an associate of his in the Horry County area,” said Assistant U.S. Attorney Nick Bianchi. Prosecutors would not reveal the informant’s identity.

Baptiste asked his associate if he knew a dock worker at the port who could help him, Bianchi said. Through the guidance of federal investigators, the informant helped Baptiste set up the drug import.

Over the course of several months, Baptiste wrote emails to undercover investigators detailing plans for an initial shipment and plans for future shipments of multiple kilograms of cocaine into the port, prosecutors said.

Baptist traveled to Charleston in March 2011 and met with the informant in North Charleston, where he was recorded by federal agents. He told the informant which container on the Maersk Dallas container ship would contain a kilogram of cocaine and how it would be packaged, federal prosecutors said.

When the container ship arrived at the Wando terminal the next day, agents removed the container and found the cocaine, according to prosecutors.

The cereal box holding the drugs held about 1.05 kilograms of cocaine that had been pressed into a brick of white powder.

The shipment was meant to be a test run for Baptiste to make sure the drugs could get through before he set up larger shipments of cocaine, according to prosecutors.

Baptiste will be sentenced in the next few months. He is in the U.S. legally but not yet a citizen, so he will be deported after he serves his sentence, according to Bianchi.