A woman has won court backing to force Facebook to reveal the identities of cyberbullies who targeted her with a string of abusive messages on the website.

Nicola Brookes was granted a high court order after receiving "vicious and depraved" abuse on Facebook after she posted a comment in support of the former The X Factor contestant Frankie Cocozza.

The woman, from Brighton, was falsely branded a paedophile and drug dealer by anonymous Facebook users who set up a fake profile page on the website.

Now Brookes plans to bring a private prosecution against at least four alleged internet trolls, after the high court said Facebook should reveal their identities.

Facebook must now reveal the names, email and IP addresses of those behind the abusive messages, showing who they are and where they posted from.

It is believed to be one of the first cases where an individual has successfully taken legal action against Facebook to reveal the identities of cyberbullies.

It is understood Facebook has not yet received the court order – known as a Norwich Pharmacal order – but will comply when it does. The order was given backing at the high court on 30 May and must now be physically served on Facebook in the US, where the social network is based.

Brookes, who suffers from Crohn's disease, said she now plans to bring "the strongest possible prosecution" against the internet trolls.

"I want them exposed. They exposed me and they invaded my life," she added. "I didn't ask for it. They wanted a reaction from me and now they have got it."

Brookes told how she was targeted with abusive comments within an hour of posting about Cocozza, after the young singer was evicted from The X Factor last year.

"People were inciting hatred against me. They weren't just targeting me, they were also dragging young girls into it as well," she said.

Brookes took legal action after being frustrated by what she saw as a lack of interest from Surrey police.

Rupinder Bains, a partner at the law firm Bains Cohen which is representing Brookes, said she would consider forcing internet service providers to hand over more information about the cyberbullies if details from Facebook do not prove useful.

Bains told the Guardian that Facebook did not resist the legal challenge, but said the obstacles for revealing the identities of internet trolls could cost lives.

"This [harassment] is a criminal offence and we have the legislation to protect us, but what's missing is the enforcement. This is where the system is failing us," she said. "In the States people have committed suicide over this and that's what will happen over here if things don't change."

Bains suggested that Facebook and other social networks should charge users a small fee to join, so they are easier to identify in the event of a legal order.

Facebook said in a statement: "There is no place for harassment on Facebook, but unfortunately a small minority of malicious individuals exist online, just as they do offline. We respect our legal obligations and work with law enforcement to ensure that such people are brought to justice."