Advocates of medical cannabis say it is effective in treating pain and nausea
Federal prosecutors in the US have been ordered to stop cannabis-related prosecutions in the 13 states where medical use of the drug is legal.
Attorney General Eric Holder said it was wrong for federal resources to be spent on prosecuting people who were in compliance with existing state laws.
But he warned that the authorities would continue to go after traffickers hiding behind medical marijuana laws.
The policy is considered a sharp shift from that of the Bush administration.
California became the first state to permit medical use of cannabis in 1996. It allows special facilities to sell the drug and even to advertise.
In 2005, the Supreme Court ruled that the federal government could continue to enforce US law barring the cultivation, possession and use of cannabis for any purpose, even when states had legalised it.
But in a policy memo issued by the Department of Justice on Monday, prosecutors were told they "should not focus federal resources in your states on individuals whose actions are in clear and unambiguous compliance with existing state laws providing for the medical use of marijuana".
However, they will be required to go after people who distribute more than is permitted under state law or use it as a cover for weapons offences, money laundering and other crimes.
"We will not tolerate drug traffickers who hide behind claims of compliance with state law to mask activities that are clearly illegal," Mr Holder said in a statement.
According to the government, 14 states allow some use of cannabis for medical purposes - Alaska, California, Colorado, Hawaii, Maine, Maryland, Michigan, Montana, Nevada, New Mexico, Oregon, Rhode Island, Vermont and Washington.
However, Maryland only allows for reduced penalties for those found to have used cannabis solely for medical reasons.
Advocates of the medical use of cannabis argue that it is effective in treating chronic pain and nausea, among other ailments.
"This is a major step forward," Bruce Mirken of the Marijuana Policy Project told the Associated Press news agency.
"This change in policy moves the federal government dramatically toward respecting scientific and practical reality."
But critics said it signalled a retreat in the fight against Mexican drug cartels, whose largest source of revenue in the US is cannabis.