Three men were also in court in Bangor accused of stealing money during a drug deal.
Donald McMahon, 26, of Old Town is facing two charges for theft and possessing a firearm.
Police say he was with Jerry Conary, 20, of Winterport, and Richard Snow, 19, of Hampden, who are both charged with conspiracy to commit theft.
Police say a Bangor man helped arrange a deal to buy marijuana from the three.
The three allegedly stole the money from the man.
They are expected to appear again in court in March.