Patients in “exceptional circumstances” in the Australian state of Victoria will soon be able to access medical cannabis, thanks to a bill passed Tuesday by the local government.

The law, which makes the state the first in the country to establish a legal framework for access to the pain-relieving drug, will facilitate its “manufacture, supply and access” in high-quality medical form, the government said in a statement. An Office of Medicinal Cannabis will also be created to oversee the drug’s production and its prescription by doctors.

Children with severe epilepsy will be the first patient group to benefit in 2017, the government said. The state will supply the initial medical products, but hopes to see a reliable manufacturing industry in the future.

The government flagged further patients could possibly become eligible, pending the report of an independent medical advisory committee it is establishing.

The news comes after the federal government also took significant steps toward allowing medical access to cannabis in 2016. In February, parliament amended the Narcotics Drugs Act, creating a national licensing scheme for the controlled cultivation and testing of medical cannabis, clearing the way for the states to create their own regimes. States including New South Wales have proposed medicinal cannabis trials, but Victoria is the first to take the leap on legalisation.

The use of medicinal cannabis in Australia is for the most part dictated by state law. While legal loopholes have allowed its use in extreme circumstances, Victoria’s bill is a step towards creating comprehensive and clear rules for patients in need.

“Children with severe epilepsy will now be able to legally access this life-saving treatment from as early as 2017,” Victorian Minister for Health Jill Hennessy said in the statement. “It is absolutely heart-breaking to see families having to choose between breaking the law and watching their children suffer – and now, thanks to our ground-breaking legislation, they won’t have to.”