More people are using medical marijuana to treat health problems, and this resulted in the decline of prescription drug use, a new study suggested.

In states where use of medical marijuana is legal, a significant decline in use of prescription medicines for ailments that could otherwise be treated with cannabis, researchers said.

"There was a substantial shift away from the use of [U.S. Food and Drug Administration]-approved drugs when states turned their medical marijuana laws on," W. David Bradford, senior study researcher and chair of public policy at the University of Georgia's Department of Public Administration and Policy, said in a report by WebMD.

In the study, the researchers analyzed 2010 to 2013 data from Medicare Part D, which is a federal program that covers prescription drugs for seniors.

The research team compared states that had legalized medical marijuana use with states that had not, to determine whether the availability of cannabis to patients affected prescription drugs demand. They specifically looked at conditions for which medical marijuana may be considered substitutes for FDA-approved drugs, which include pin, nausea, anxiety, depression, glaucoma, psychosis, seizures, sleep disorders and spasticity.

Results of the study indicated that there were fewer prescriptions written for all conditions. For instance, daily doses dropped by 1,826 for pain treatment medication and 265 for depression medication.

However, the number of daily doses increased by 35 for glaucoma medication.

"The results suggest people are really using marijuana as medicine and not just using it for recreational purposes," Ashley Bradford, co-author of the study, said in a press release.

The researchers also found that an estimated $165.2 million worth of prescription drugs were saved in 2013, following the implementation of medical marijuana laws in 17 states including the District of Columbia.

According to the study, Medicare will save an estimated $468 million worth of overall prescription medication if all states will legalize medical marijuana use.

Each of the 25 states, including the District of Columbia, with a medical marijuana law has set different guidelines and limitations for use and possession. Physicians in these states may recommend cannabis use but are prohibited to prescribe the medication.

The researchers will proceed with studying the consequences of "unmanaged" medical marijuana and apply the same study with federal and state joint health program Medicaid.