Legalizing cannabis would generate hundreds of millions of dollars each year for the UK government, a leaked report has revealed.

The BBC's Newsnight program obtained a copy of a study by the UK Treasury which found legalizing and regulating the drug would "generate notable tax revenue" as well as save the criminal justice system more than $300 million a year in court and police costs.

The government said it had "no plans" to change the law, though British politicians did debate the issue on Monday following a petition demanding legalization that gained more than 220,000 signatures.

The study was commissioned by the Liberal Democrat party, the then-partner of the Conservatives in a coalition government. Its goal was to examine the "potential fiscal impacts of introducing a regulated cannabis market in the UK."

It said 216 tonnes of cannabis was smoked in the UK in the past year and that 2.2 million people aged 16 to 59 are thought to have used the drug in that time, making it the country's most widely used narcotic.

Cannabis is an illegal drug in the UK, rated as a Class B substance alongside speed and ketamine. It was downgraded to Class C between 2004 and 2009 but upgraded again due to concerns about the impact of stronger strains on users' mental health.

The Home Office said in a statement: "The government has no plans to legalize or decriminalize cannabis.

"There is clear scientific and medical evidence that cannabis is a harmful drug which can damage people's mental and physical health, and harms individuals and communities."

But campaigners say criminalization does not decrease usage and puts the market and its profit in the hand of criminals. They point to the success of law changes in US states such as Alaska, Colorado, Oregon, and Washington.

The recent petition described cannabis as "a substance that is safer than alcohol, and has many uses. It is believed to have been used by humans for over 4,000 years, being made illegal in the UK in 1925."

The man who started the petition, 25-year-old student James Owen, told the Guardian the time to legalize had come. "With Uruguay legalizing, a lot of states in the US legalizing, government cuts, people don't want to spend the money on policing something they find is harmless," he said.