Actor Craig Robinson was detained then ordered to pay a fine yesterday after security officials in the Bahamas found a small amount of pot and pills.

Robinson -- who is best known for his role on "The Office," has also appeared in stoner classics Pineapple Express, Zach and Miri Make a Porn, This is the End and Hot Tub Time Machine -- was stopped as he tried to board a plane in the capital, Nassau and head back to the United States. Customs agents found half-gram of marijuana and 18 ecstasy pills, said Supt. Stephen Dean of the Royal Bahamas Police Force.

The actor told the court he brought the drugs from the United States and did not know they were illegal in the Bahamas.

Magistrate Andrew Forbes ordered him to pay a $1,000 fine and directed that he be turned over to authorities and removed from the country. He could have faced four years in prison.

The takeaway? It's not safe to fly with your stash. Yet.