Possessing and growing cannabis for personal use will be legal in the nation's capital next year.
The ACT will become the first state or territory in Australia to allow cannabis use, with residents over 18 permitted to possess up to 50 grams and grow two plants.
The ACT's Legislative Assembly passed a private member's bill from Labor backbencher Michael Pettersson on Wednesday, but residents will have to wait until the law comes into effect on 31 January 2020 before they can light up.
The bill would require cannabis not to be used near children and kept out of their reach.
Driving under the influence would stay illegal, as would growing it in community gardens or hydroponically and while each Canberran can grow two plants, there would be a limit of four per household.On Wednesday, Chief Minister Andrew Barr suggested Commonwealth prosecutors had been pressured by the federal government to revise their legal advice to the ACT government.
The Commonwealth Director of Public Prosecutions initially provided advice to the ACT on what defences would be available to those charged under Commonwealth law, but in a letter, a week later said it "would not be appropriate" to give advice.
Mr Barr said this raised questions of what changed between those two letters.
Individual police would still be able to charge people under Commonwealth law, but Mr Barr said the ACT's Attorney-General would intervene to defend anyone charged under federal law.
Mr Ramsay acknowledged that possession and growth of cannabis would remain a federal offence and the risk of prosecution was not entirely removed, but said "in practice" the laws would not apply.
Mr Pettersson said a defence exists for cannabis use under Commonwealth law if the use is excused or justified by state or territory law.
"Commonwealth law has been written with the express understanding that there are differences," Mr Pettersson said.
"I don't think it's particularly likely the Commonwealth government will try to fight this."
A review of the laws will be conducted within three years.
The Liberal opposition did not support the bill, describing it as badly drafted and raising concerns it would lead to a number of "perverse outcomes".
ACT shadow attorney-general Jeremy Hanson told the assembly it would encourage more people to use cannabis, which medical professionals say would lead to increased rates of psychosis.
Mr Hanson said the fact it conflicted with Commonwealth law would also be confusing for police.
"This puts not only individuals at a greater level of risk but our police will be out there on the beat working in this unclear legal framework," Mr Hanson said.
Federal Attorney-General Christian Porter said the bill was a matter for the ACT, but where Commonwealth laws applied they remained enforceable.
Federal Health Minister Greg Hunt said any problems with Commonwealth law were a matter for the attorney-general, but the Morrison government did not support legalising cannabis for recreational use.
Mr Barr said the government had consulted with ACT Policing.