Getty Composite
Exclusive

Brooke Mueller Deep Connection To Perry Death Case ... Rehab With Matthew & 'Ketamine Queen'

Brooke Mueller has some deep connections to the Matthew Perry death case ... TMZ has learned she knew the woman who prosecutors say sold the fatal dose, and was super close to the guy prosecutors say delivered the ketamine that killed Matthew ... and she aided in the police investigation.

Multiple sources with direct knowledge tell TMZ ... Brooke once spent time in rehab with Matthew and Jasveen Sangha, AKA "The Ketamine Queen," and all 3 were at the same L.A.-area facility at the same time.

Jasveen was arrested Thursday in connection with Matthew's death ... and prosecutors say she's the one who ran the stash house.

Our sources say Brooke was also BFFs with Erik Fleming, who cut a deal and pled guilty to a pair of charges ... conspiracy to distribute ketamine and distribution of ketamine resulting in death and serious bodily injury. Prosecutors say he was a drug broker who delivered the ketamine from Sangha's stash house to Perry's live-in assistant, Kenneth Iwamasa.

Brooke has been extremely close with Matthew for years ... and our sources say Brooke met her future husband Charlie Sheen at a party at Matthew's house.

Matthew died in October and, as we reported, when Brooke was in rehab this past March, authorities got a search warrant in connection with Perry's death and seized Brooke's computer and phone.

Now, in order to get a search warrant, cops have to show probable cause a crime was committed ... and they were able to do that here.

Thing is ... Brooke has NOT been arrested and one well-placed source insists she did not testify before a grand jury and did not get immunity before talking to authorities.

But we are told Brooke cooperated with authorities and helped their investigation, which ultimately led to her bestie, Fleming, being indicted. BTW ... Fleming has already cut a plea deal.

Hollywood's a small town ... and the Hollywood drug scene seems even smaller.

Click here for info about our online advertising practices.