Demi Lovato has claimed she was sexually assaulted by her drug dealer on the night of her near-fatal overdose.

The 28-year-old singer was rushed to hospital in July 2018 when she almost died following a drug overdose that caused her to suffer three strokes, a heart attack, and organ failure.

Demi opens up about her ordeal and her journey back to health in her upcoming YouTube Originals documentary series, Dancing with the Devil – which premiered at the SXSW Online festival on Tuesday – and alleges the man who supplied her with heroin on the night of her overdose also sexually abused her.

Demi recalls in the series that she was asked by doctors following her overdose if she’d had consensual sex on the night of the incident.

"I remembered him lying on top of me, so I said, ‘yes’," she said. "It wasn’t until maybe a month after my overdose that I realised, ‘Hey, you weren’t in any state of mind to make a consensual decision.’ That kind of trauma doesn’t go away overnight.”

And Demi went on to say she was also raped when she was 15.

"When I was a teenager, I was in a very similar situation," she revealed. "I lost my virginity in a rape."

While she and the unnamed actor had been "hooking up" at the time, Demi insists she wasn't "ready" to go all the way.

"I was part of that Disney crowd that publicly said they were waiting until marriage. I didn't have the romantic first time," she explained. "That was not it for me — that sucked. Then I had to see this person all the time so I stopped eating and coped in other ways."

While Demi says she told adults about what had happened, the alleged rapist "never got in trouble for it".

And trying to take the situation into her own hands by calling him about a month after the incident, the Stone Cold star was left feeling "worse".

"Both times were textbook trauma re-enactments, and I really beat myself up for years which is why I had a really hard time coming to terms with the fact it was a rape when it happened," she sighed.