Last updated on .From the section Basketball

Barnes played 20 times during his second spell at the Warriors in their 2016-17 title-winning season

"I would smoke cannabis six hours before a game. We'd have a shoot-around in the morning, I'd come home and smoke a joint, take a nap, shower, eat and go and play."

Matt Barnes won the NBA with Golden State Warriors last year after following that pre-game routine.

The 38-year-old retired last June after the 4-1 series win over Cleveland Cavaliers and has told BBC Sport that use of the banned substance is "widespread" despite being in breach of NBA rules.

Barnes says he even discussed cannabis with his coach, seven-time NBA champion Steve Kerr, who has previously admitted external-link to taking the drug to ease chronic back pain.

But is using a substance that is legal for medical use in 29 states and recreationally in nine of those really so prevalent in one of the most moneyed sports leagues in the world?

If so, how are players getting away with it? And what is the NBA doing about it?

Why are players using cannabis?

Cannabis has been a part of Barnes' life since he was 14, but he refutes suggestions that he is addicted.

During his 14 seasons in the NBA with seven different teams, he used it to manage pain, to relax and to help him sleep, and says it "brought me peace of mind".

The story is echoed by several of Barnes' contemporaries in a sport where athletes are often asked to play several high-intensity matches in distant cities within the space of a few days.

Former NBA power forward Kenyon Martin, in an interview with Bleacher Report in April external-link , estimated that 85% of NBA players smoked the drug during his career.

And one of Barnes' former Warriors team-mates - Al Harrington - has taken his cannabis use into retirement by founding a medical marijuana company.

Harrington, who played 16 seasons in the NBA before quitting in 2014, says he first smoked cannabis following a Warriors game in 2007.

He then smoked it during the off-season for seven years and used gel capsules and creams containing cannabis between matches to manage pain.

"Even the coaches and owners are using it," the former Denver Nuggets power forward told BBC Sport. "Each team I played on had at least five smokers and not once did they arrive at a game under the influence."

The 38-year-old - who resorted to cannabis following knee surgery in 2012 after seeing how it helped a relative's glaucoma - has a vested interest, but is a staunch advocate of the drug.

He argues that it is unfair to prevent players using cannabis in US states where it is legal: "Why are they living by a different standard to the people that come and watch them play?"

And he believes the side-effects are less harmful than the anti-inflammatory pills he took every day from the age of 19 until he discovered cannabis almost eight years later.

"I wasn't addicted to opioids. But who knows what they were doing to my body?" he adds.

The National Institute on Drug Abuse state that "every day, more than 115 people in the United States die after overdosing on opioids".

Is it legal in the US? And what are the risks?

There are only four US states where cannabis is entirely illegal. It is permitted for medical use in 29 of the 50 states, and recreational use in nine of those. A further 17 allow use of the non-psychoactive components of the drug (limited THC)

Just like in the UK, it is illegal to possess, use, buy, sell, or grow cannabis in the US, at a nationwide level at least.

So far, so simple.

However, 29 US states have passed legislation allowing medical use of the drug, and nine of those states permit recreational use.

So far, the US government has not enacted federal law in these instances, meaning companies such as Harrington's have sprung up across the country.

However, the US Food and Drug Administration (FDA) - the government agency responsible for regulating drugs - has not approved cannabis as a safe and effective drug for any indication.

And the World Heath Authority (WHO) says the side-effects external-link include impairing learning, memory, attention and co-ordination, as well as addiction in chronic users.

In 2017, they concluded that external-link the non-psychoactive component of cannabis does not appear to have abuse potential or cause harm.

So what is the NBA doing?

In association with the players association (NBAPA), the NBA runs an anti-drug programme and cannabis is on their prohibited substances list.

Each player has nine unannounced drugs tests each year and the punishment for cannabis being found in a players' system is a place in the league's treatment and counselling programme.

That involves being tested weekly for three months until they 'graduate' - something which Barnes believes has "no point".

The BBC asked the NBA how many tests were failed because of cannabis last season, but a clause in the NBA collective bargaining agreement (CBA) external-link means such information remains undisclosed.

NBA's anti-drug policy Performance-enhancing substance Marijuana First violation 25 game suspension Treatment & counselling programme Second violation 55 game suspension $25,000 fine Third violation Minimum two-year ban Five-game ban

Despite using the drug consistently, Barnes only failed two tests during his career - one in 2007 while playing for the Golden State Warriors and one in 2014 with the LA Clippers.

The forward's explanation is that, after the initial fear of being caught subsided, he just became better at navigating the testing system.

"I understood how much I could smoke and get it out of my system before my next test," he says.

"Everyone from your rookies to the top players are using cannabis. If we're still out there doing our jobs we shouldn't be penalised."

Harrington found similar ways to manipulate the system but concedes he was "almost hoping to get caught" so he had a platform to discuss the issue.

He maintains that, had he been able to use cannabis freely, he could have extended his career by "two or three years".

What is the NBA saying about it?

The science of cannabis

Earlier this year, the World Anti-Doping Authority (Wada) removed one of the active ingredients of cannabis - the one associated with medical benefits - from its banned list.

And Harrington says the NBA has responded to that by discussing the issue behind closed doors.

"Allowing the medical component (CBD) will break down the barrier, then allowing psychoactive element (THC) will come soon after," he says.

"But THC is the elephant in the room. People just don't want to see guys sitting smoking and then showing up to games playing high."

Barnes, who believes "1,000% cannabis should be taken off the banned substances list", says there remains a disconnect between the rule makers and the players in the NBA, but says he will meet commissioner Adam Silver this summer to talk about the issue.

"I think the fact people are actually willing to have a conversation about it is huge," he says. "They're listening, they're about what the players want and we [the NBA] will take the lead on this."

In a recent documentary with Harrington, former NBA commissioner David Stern - who implemented stricter testing and harsher punishments during his 30-year tenure - said his stance had softened.

"I'm now at the point where, personally, I think [cannabis] probably should be removed from the ban list," said Stern, who ran the NBA until 2014.

BBC Sport asked the NBA for comment, and were pointed to a statement from NBA executive vice-president Mike Bass in 2017.

"While Silver has said we are interested in better understanding the safety and efficacy of medical marijuana, our position remains unchanged regarding the use of it for recreational purposes," Bass said.