A Massachusetts federal judge on Wednesday questioned whether he has the authority to step around U.S. Supreme Court precedent to declare that the federal government cannot prosecute state-licensed, intrastate cannabis sales under the Controlled Substances Act.

In an hourlong, wide-ranging hearing, U.S. District Judge Mark Mastroianni pressed David Boies to explain how he could deviate from the high court’s 2005 ruling in Gonzales v. Raich, which held that Congress can outlaw medical marijuana under the commerce clause even if states permit its use. Boies’ firm, Boies Schiller Flexner, represents Massachusetts cannabis companies whose owners argue state-legal cannabis has become so commonplace that the factual roots of the Gonzales case have eroded.