A convicted drug dealer reluctantly testified Monday that Jam Master Jay — known for his anti-drug advocacy as part of the groundbreaking rap group Run-DMC — got involved in cocaine deals to pay his bills.

Taking the stand at the federal murder trial over the DJ's October 2002 death, Ralph Mullgrav gave the first testimony about the alleged drug dealing that, prosecutors claim, got the rap star killed. He was shot dead in his studio in front of stunned aides, one of whom wept in court Monday as she recounted the attack.

Mullgrav said Jam Master Jay, born Jason Mizell, approached him periodically to sell cocaine that the rap star had acquired — "maybe 1 or 2 kilos, here or there."

DARIUS RUCKER CAUGHT WITH MARIJUANA AND PSYCHEDELIC PILLS WHEN HE WAS PULLED OVER IN TENNESSEE: POLICE

"Jason wasn't a drug dealer. He just used it to make ends meet," Mullgrav told jurors.

The defendants — Mizell's godson, Karl Jordan Jr., and the DJ's childhood friend Ronald Washington — have pleaded not guilty to murder in a case that has offered answers to the long-unsolved loss of a hip-hop legend while airing questions about how his life went once the limelight dimmed.

While Run-DMC helped rap gain mainstream popularity in the 1980s as the first rap group to notch gold and platinum albums and have a video in rotation on MTV, it also distanced itself from drugs.

Run-D.M.C. poses for a picture in Los Angeles

Darryl McDaniels (D.M.C.), left, Jason Mizell (Jam Master Jay), center, and Joseph Simmons (Run), right, of the influential hip hop group Run-D.M.C., are seen in Los Angeles, California, in May 1999. (Bob Berg/Getty Images)

The trio delivered the message in rap with the 1987 hit "It’s Tricky," with lyrics including: People "offer coke, and lots of dope, but we just leave it alone." They even recorded an anti-drug public service announcement.

But at the trial, prosecutors and some witnesses have depicted a rap star who became a cocaine middleman as his career slowed and money ran short. Speculation that he was killed over a drug dispute circulated in chatter and media reports for decades, but so did other theories. Mizell's family insisted he didn't deal narcotics.

Federal prosecutors have said Mizell was arranging a lucrative cocaine transaction when he was killed. They say Jordan and Washington were going to be cut out because a dealer — now identified as Mullgrav — refused to work with Washington.

Mullgrav told jurors that Mizell approached him in August 2002, saying he had a line on 10 or so kilograms of cocaine and "asking me to move it for him" in Baltimore. Mullgrav lived there at the time and acknowledged he oversaw a cocaine-distribution ring with about 25 workers.

"He wanted me to work with Tinard. I told him no," Mullgrav said, using Washington's nickname. They knew each other from growing up, and Mullgrav told jurors he disliked Washington enough to want to shoot him when he appeared in Baltimore around that time.

Mullgrav spent 12 years in federal prison on a drug-related conviction before his 2013 release. He testified only after being arrested on a material witness warrant — a procedure that can be used to compel court appearances — and spending seven days behind bars, said Gary Farrell, an attorney who was appointed to represent him.

Mullgrav had balked at testifying Friday, and he was laconic in court Monday.

Prosecutors and witness Uriel Rincon, a Mizell assistant who was shot alongside him, have said that Jordan shot Mizell while Washington brandished a gun and blocked the door.

A second eyewitness, Lydia High, also testified Monday that Washington was at the doorway and commanded her at gunpoint to lie on the floor.

High, then JMJ Records' business manager, told jurors that she was looking down at some paperwork when someone walked into the studio and approached Mizell on the evening of Oct. 30, 2002. She didn't identify the person, but described some attributes that roughly fit Jordan, including a tattooed neck.

The DJ gave the visitor a friendly greeting. But then he let out an expletive, his expression changed and gunshots erupted, High said, struggling to put the experience into words.

"I was — I was — I was frantic and shocked," she said through tears. She recalled running for the door, where she said Washington — whom she knew from her childhood block — ordered her to the floor.

CLICK HERE TO GET THE FOX NEWS APP

When asked about Mizell's condition, she paused and looked downward, crying, before prosecutor Artie McConnell withdrew the question.

While cross-examining High, defense lawyers emphasized that she initially didn't tell investigators about Washington, nor about a gunman with a neck tattoo.

"I was afraid for my life. I just saw something that I couldn't believe," High explained.

Jordan’s attorneys have said he was at his then-girlfriend’s home at the time of the shooting. Washington’s lawyers have argued that he had no reason to kill a friend who was helping him financially.