Craig Robinson, former "The Office" actor, was detained in the Bahamas on Wednesday for a small amount of drugs, but it was "nothing major."

Robinson, who played Darryl Philbin, a warehouse worker on NBC's long-running sitcom "The Office," was in the Bahamas for a comedy show. When he attempted to catch his flight back to the United States via an airplane in Nassau, customs agents stopped him. Upon searching the 41-year-old actor, agents found a small amount of marijuana and suspicious pills.

"It was nothing major," Stephen Dean of the Royal Bahamas Police Force told Associated Press.

Robinson was then taken into custody and pleaded guilty to Magistrate Andrew Forbes for two counts of drug possession. He reportedly remained calm during the ordeal, which he went through without a lawyer sporting a T-shirt and shorts.

According to Prosecutor Ercel Dorsett, Robinson's small amount of drugs surmounted to half a gram of marijuana and 18 ecstasy pills. The star faced up to four years in prison.

The This Is the End actor told the court that the drugs came from the United States and that he did not know that they were illegal in the Bahamas.

Magistrate Forbes ordered Robinson to pay a $1,000 fine and that he be given to authorities and removed from the Bahamas.

In June of 2008, Robinson was also arrested for possession of ecstasy and methamphetamine in Culver City, a Los Angeles neighborhood. The actor was charged with one count of being under the influence of illegal drugs and two felony counts of drug possession. Robinson completed a diversion program, and the charges were dropped.