Two Arizonans lent a medical-marijuana company in Colorado $500,000, but the company didn't pay them back.

So, what did they do? They sued, of course.

But instead of forcing the company to pay back the loan, a Maricopa County Superior Court judge told the two Valley business partners they were out of luck as far as he was concerned.

Marijuana is illegal under federal law. And the judge said he can't enforce the loan agreement because the money was for an illegal purpose under federal law. He dismissed the suit.

Judge Michael McVey's ruling could have larger implications for contractual relationships tied to medical-marijuana businesses, one attorney said.

"This is just one contractual relationship," said Randy Nussbaum, managing partner of a law firm that represented the plaintiffs. "The macro view of this is, if it's true that anyone who has a contractual relationship with anyone dispensing medical marijuana and that contract is not enforceable, how does anyone enforce a legitimate contract in this business?"

Arizona, Colorado and 14 other states have medical-marijuana laws that conflict with federal law, which outlaws the cultivation, sale or use of marijuana. Mounting federal pressure in California, Washington and other states has led to dispensary raids and crackdowns on landlords who lease property to dispensaries.

Recently, several U.S. attorneys have sent letters to local officials reiterating that federal authorities have not changed their stance on medical marijuana.

Court records show Michele Rene Hammer and Mark Haile in August 2010 each agreed to lend Today's Health Care II $250,000 to finance a "retail medical-marijuana sales and growth center."

When Today's Health Care II did not repay the loan or the default interest rate and fees, Hammer and Haile sued. William Kozub, who represented Today's Health Care II, did not return a call for comment.

It is unknown if the plaintiffs will appeal.

McVey, in his April 17 judgment of dismissal, wrote that he recognizes his ruling was harsh but that federal law pre-empts state law and, therefore, the loan agreement was not enforceable because the money was for an illegal purpose because the U.S. still categorizes marijuana as a Schedule 1 controlled substance.

McVey also wrote that under federal law, it is unlawful to aid and abet the commission of a federal crime.

He wrote that dispensation of marijuana, even for medicinal purposes, remains illegal.

"The explicitly stated purpose of these loan agreements was to finance the sale and distribution of marijuana," McVey wrote. "This was in clear violation of the laws of the United States. As such, this contract is void and unenforceable."

Phoenix attorney Richard Keyt, who runs medical-marijuana blog keytlaw.com, wrote that if McVey's decision is upheld, it could have implications for landlords who lease to dispensaries because the lease may not be enforceable, and for dispensary investors, dispensary medical directors, and employees or independent contractors who may have disputes.

Keyt wrote that the ruling could mean "that people who enter into contracts that relate in any way to Arizona medical marijuana will have to hope the other side to the contract satisfies his/her/its obligations because it may not be possible to sue for breach of contract and get a judgment against the party who defaults."