Even as Purdue Pharma was publicly brushing off concerns about opioid addiction, the company was secretly planning to profit off the epidemic, according to a newly unredacted court filing by Massachusetts Attorney General Maura Healey.

But the company never followed through on the plan, called “Project Tango,” says an amended complaint and jury demand filed in connection with Healey’s lawsuit against opioid manufacturer Purdue Pharma and its board members.

Healey filed the suit in Suffolk Superior Court in June.

The suit alleges that former Purdue Chairman and President Richard Sackler and other Sackler family members and Purdue board members knew how addictive opioids were, yet marketed them aggressively anyway. She said the company misled doctors and consumers about the addiction and health risks of opioids, including OxyContin.

Her filing details Purdue’s aggressive marketing, which aimed to get doctors to keep more people on higher doses of opioids for longer periods of time.

More details about the lawsuit have become available as the redactions have been removed from Healey’s brief under court order. The order was in response to a motion filed by The Boston Globe and STAT that was later joined by Reuters, the Wall Street Journal, the New York Times and WBUR.

Purdue Pharma said in a statement released earlier this month that Healey's complaint "irresponsibly and counterproductively casts every prescription of OxyContin as dangerous and illegitimate, substituting its lawyers' sensational allegations for the expert scientific determinations of the Food and Drug Administration and completely ignoring the millions of patients who are prescribed Purdue Pharma's medicines for the management of their severe chronic pain."

“The complaint is littered with biased and inaccurate characterizations of these documents and individual defendants, often highlighting potential courses of action that were ultimately rejected by the company,” Purdue Pharma wrote in its statement.

The latest copy of the filing, released Thursday evening, reveals for the first time the existence of the “Project Tango” proposal, which board member Kathe Sackler pitched to the Purdue Pharma board in 2014.

Publicly, the company had been telling doctors that opioid addiction was the fault of addicts, and their drugs would not cause addiction if taken by a “trustworthy” person and used correctly.

However, the new documents say Purdue Pharma knew opioids would cause addiction and considered getting into the business of selling drugs to treat addiction.

Sackler wrote in internal documents that opioids and addiction are “naturally linked” and Purdue Pharma should consider becoming an “end-to-end pain provider,” providing opioids to treat pain, and then offering suboxone to treat addiction.

The documents noted the large increase in opioid addiction over the prior five years and said opioid addiction “can happen to any-one.” Sackler wrote that the market for addiction treatment was attractive due to “large unmet need for vulnerable, underserved and stigmatized patient population suffering from substance abuse, dependence and addiction.”

Healey wrote in her brief, “The Tango team mapped how patients could get addicted to opioids through prescription opioid analgesics such as Purdue’s OxyContin or heroin, and then become consumers of the new company’s suboxone.”

Although that proposal was dropped, company officials again discussed profiting off addiction in June 2016, this time by selling the drug Narcan, which can revive someone after an overdose. They considered marketing Narcan to the same doctors who were prescribing large amounts of opioids.

“Purdue’s analysis of the market for NARCAN confirmed that they saw the opioid epidemic as a money-making opportunity, and that the Sacklers understood — in private, when no one was watching — how Purdue’s opioids put patients at risk,” Healey wrote.

As the public became more concerned about opioid addiction, long-time employee Craig Landau, applying for the job of CEO that he eventually got, proposed that Purdue take advantage of other companies backing away from the market by becoming the country’s dominant opioid seller.

The court filing also says Purdue Pharma knew its drugs were being abused.

At a 2010 board meeting, Purdue staff gave the board a list of doctors who were suspected of allowing opioids they prescribed to be diverted and abused, along with the amount of sales each doctor generated. The list included 12 doctors in Massachusetts.

Staff reported that Dr. Michael Taylor of New Bedford wrote more than 500 prescriptions for OxyContin over two years, providing Purdue with nearly $400,000. They told the board that Dr. Alan Chua of Brookfield prescribed OxyContin more than 1,000 times, providing more than $430,000 to Purdue.

A year later, the Massachusetts Board of Registration of Medicine took away Chua’s medical license for improper prescribing. Three years later, the Board of Registration of Medicine took away Taylor’s license, and he was convicted in court of prescribing opioids without a legitimate medical purpose.

Four patients died after overdosing on opioids prescribed by those two doctors.

There were eight members of the Sackler family on Purdue’s board of directors. Between 2007 and 2016, the Sacklers voted to pay themselves a total of $4.2 billion from the company’s profits, according to the court filing.