Image copyright Getty Images Image caption Melissa Benoist said she hoped sharing her story would 'help prevent more' from happening

Supergirl star Melissa Benoist has spoken out about being in an abusive relationship - saying at one point she had to learn to lock herself in a room.

In a video on Instagram, the actress says she "never thought" she'd be sharing a story like this.

She then gives details of how the "violence escalated" and how she "had to get out".

"I hope telling my story might help prevent more stories like mine happening," she says.

WARNING: This article contains details which some people may find upsetting

Image copyright Melissa Benoist/Instagram

In the video, which is captioned Life Isn't Always What It Seems, the actress never names the alleged perpetrator or suggests when the relationship took place or how long it lasted.

Melissa says "the abuse was not violent at first" but was more manipulative.

"Work in general was a touchy subject," she says.

"He didn't want me ever kissing or even having flirtatious scenes with men..."

She says she turned down auditions and job offers because she "didn't want to hurt him" and now sees that behaviour as a "red flag" for what was to come.

Image copyright Getty Images Image caption The actress has played Kara Danvers in the Supergirl series since 2015

The 31-year-old says the violence started with "a smoothie being thrown in my face" before escalating to the point where she was "pinned down, slapped and repeatedly punched".

"I learned to lock myself in rooms but quickly stopped because the door was inevitably broken down," she says.

In the video, she says her "most vivid memories" are arguments ending when "a wave of guilt would wash over him" and he'd "carry me to an empty bath" before crying and giving what she calls "the typical abuser's apology speech".

Image copyright Getty Images Image caption Melissa says she's "can't describe" the relief she felt when she finally confided in someone

Melissa says she would "just plain lie" to her closest friends to cover up what was going on until one day one of them confronted her about it.

"Unbeknownst to me, many people in my life suspected and feared exactly what was happening.

"It was the first moment I spoke about the abuse to anyone and I can't describe the amount of relief I felt.

"She held me and she said, 'You know what you have to do now, don't you?'"

'You deserve a violence-free life'

The actress says "leaving was not a walk in the park" but that the more people she "let in" the more she was "bolstered".

She closes the video by addressing anyone who might be going through something similar.

"What I went through caused a tectonic shift in my outlook on life. I will be healing from this for the rest of my life. And that's OK.

"If you are enduring what I went through and you see this... at least you might begin to think of your freedom.

"You can and deserve to live a violence-free life."

Since the video was released, hundreds of people have responded to the post and the hashtag #IStandWithMelissa was trending on Twitter.

Image copyright @OlivarryGrephen/Twitter

Image copyright @KatieMinard/Twitter

One fan called the story "absolutely heartbreaking" saying the actress is "so strong" while another thanks her "for being yet another voice to say it's OK to say no".

Other celebrities have also supported her.

Riverdale actress Lini Reinhart said she was "so moved by her bravery" on Instagram' while writer Natasha Rothwell tweeted: "Check on your strong friends. Check on your quiet friends... Check on each other."

Melissa's bravery "will undoubtedly help and encourage others to do the same", says Sandra Horley, chief executive of domestic abuse charity Refuge.

"Change can only come when domestic abuse is brought from out of the shadows."

If you, or anyone you know, are affected by this story you can find more links to help on the BBC Advice pages or contact the National Domestic Abuse Helpline.

Follow Newsbeat on Instagram, Facebook, Twitter and YouTube.

Listen to Newsbeat live at 12:45 and 17:45 weekdays - or listen back here.