BANGOR, Maine — A York County man a federal prosecutor said may have spent the past year “jet-setting around the Caribbean and Central America” spending money he earned selling large amounts of marijuana was released Thursday on $10,000 unsecured bail.

James A. Sweeney, 27, pleaded not guilty June 22 in U.S. District Court to conspiracy to possess with intent to distribute 100 kilograms or more of marijuana.

Conditions of his release require that Sweeney live with a relative in Standish, abide by a curfew to be set by U.S. Probation and Pre-trial Services and call that office daily, not travel outside of Maine and have no contact with others charged in connection with a scheme to bring marijuana from Arizona to Maine in recreational vehicles.

Sweeney told U.S. Magistrate Judge Margaret Kravchuk at his bail hearing that he hoped to work on a lobster boat in Casco Bay.

Assistant U.S. Attorney Joel Casey on Thursday withdrew his motion that Sweeney be held without bail pending the outcome of his case but said he had “lingering concerns regarding the defendant’s risk of flight.”

“Sweeney has been on the lam, so to speak, for about a year in the Caribbean and Central America,” Casey told the judge. “He came back, knowing there was a warrant out for his arrest. It’s to his credit that he returned to the U.S.”

Casey said that last year investigators suspected Sweeney may have had $290,000 hidden in a safe deposit box somewhere, which he may have been living off of while in the Caribbean and Costa Rica.

Defense attorney Marvin Glazier of Bangor told the judge that his client had no money hidden away and returned to the U.S. knowing he would be arrested.

Sweeney, who was arrested June 4 in Texas, came to the attention of law enforcement when a man, identified only by the initials C.S., was stopped on June 28, 2011, for a traffic violation on Interstate 44 in southwest Missouri, according to the affidavit filed last August in federal court.

Sweeney was indicted June 13, 2012, by a federal grand jury in Bangor on the charge to which he pleaded not guilty last week.

The Missouri traffic stop last year led to the arrest of Gerald Rich Jr., 47, of Frankfort, Maine, and Mark Wolosko, 46, of Kennebunkport after 375 pounds of marijuana was found in a 31-foot 2004 Coachman Freedom recreational vehicle owned by Rich. Sweeney is charged with being part of the conspiracy to transport hundreds of pounds of marijuana from Arizona to Maine.

Though Rich and Wolosko were charged with possession with the intent to distribute marijuana, the charges were dismissed a month after their arrests at the request of the U.S. attorney’s office.

Since those events, two other cooperating defendants have told investigators that Sweeney and Rich pooled their funds to purchase marijuana in Arizona through a connection Sweeney had in that state, according to the affidavit filed last August in Sweeney’s case. Until his arrest earlier this month, Sweeney’s file was sealed.

Rich and Wolosko could face charges again for their roles in the marijuana distribution scheme, according to the U.S. attorney’s office.

If convicted, Sweeney faces a minimum of five years in federal prison and a maximum of 40 years and a fine of up to $2 million.