A man isn't entitled to use Arizona's religious-freedom law to overturn his conviction for possessing marijuana while driving, the state Supreme Court ruled Tuesday.

The unanimous ruling rejected Danny Ray Hardesty's argument that he was entitled to use the same defense allowed for peyote use in Native American sacramental rites.

Hardesty said he belonged to a church whose main religious sacrament is allowing individual families to establish their own modes of worship.

"Hardesty's mode was to smoke and eat marijuana without limit as to time or place," the court opinion noted.

Along with claiming a state constitutional protection that the Supreme Court said it didn't need to address, Hardesty sought to apply 1999 state law prohibiting government from burdening a person's exercise of religion except when there's a compelling governmental interest and when government uses the least restrictive means.

The justices said it's already been established that concerns about public safety and health give the government a compelling interest in restricting marijuana use.

And the court concluded that Hardesty's claims that he has a right to use marijuana whenever he pleases, including while driving, means nothing less restrictive than a ban would suffice.

Granting a prosecution motion, the trial judge had prohibited Hardesty from using a religious freedom defense.

A midlevel appeals court upheld his convictions, ruling there is no constitutional right to use marijuana.