PORTLAND — A Boston man denied a federal charge Thursday in connection with what investigators who rounded up more than a dozen suspects called a major drug operation in the Twin Cities that sold surplus medical marijuana out of state and to non-patients.

Yehudi Pardo, 33, pleaded not guilty in U.S. District Court to a charge of attempted possession with intent to distribute marijuana, a felony punishable by up to five years in federal prison and a fine of up to $250,000.

He was released on personal recognizance and cautioned he must show up for court appearances or face a separate bail-jumping charge, punishable by up to five years in prison.

Through lawyers Bradford Stanton of Massachusetts and Valerie Randall of Portland, Pardo asked Magistrate Judge John Rich III if he would be allowed to travel to the oil fields of Texas, where he works as a contract manager.

Rich told him he may go to Texas for work, but he must first notify U.S. Probation and Parole Office of any change in residence or phone number.

In October, a federal grand jury handed up a 41-count indictment against more than a dozen suspects — most from Lewiston and Auburn — stemming from federal raids in 20 locations in the Twin Cities area in February.

The aim of the raids was to bust a medical marijuana-growing operation that illegally sold surplus pot and derivatives, according to police and federal drug agents.

Prosecutors alleged the drug-trafficking organization grew and distributed large amounts of marijuana under the cover of Maine’s medical marijuana program, but sold marijuana to buyers who were not participants in the program and included out-of-state customers.

A trial in the case is not expected before spring.

[email protected]