When Bahrain erupted in anti-government protests in February, many in the West extolled the positive role played by social media sites such as Facebook, including some writers on The Huffington Post.
But for many in Bahrain, sites such as Facebook had a darker, more sinister role to play in the uprising - according to a programme broadcast by Al Jazeera on Thursday.
It tells the story of Ayat al Qurmezi, a 20-year-old woman, who first attracted attention from authorities by publicly reading a poem that was critical of Crown Prince Salman bin Hamad al-Khalifa and the king.
Her actions, at Pearl Roundabout in Manama, the focal point of the demonstrations, led to a Facebook page calling for her torture and arrest.
Thousands of pro-government supporters flocked to the page, where they goaded each other to post horrific messages such as "I spit on you whore!" and "God willing the security forces smash her mouth and teeth", before demanding the woman's arrest.
The film alleges that this page, and others like it, were allowed to stay live for months instead of being pulled down by moderators.
And as the documentary reports, those wishes were granted when with the help of the Facebook page, Ayat was tracked down and taken into custody.
"What we've heard is that Ayat was tortured and put in the military hospital," Ayat's mother says in the 50-minute film. "I'm going to die from worrying about her."
It was only three months later that Ayat turned up on state TV, to issue an apology that the family says was obtained by force.
The documentary also alleges that Facebook pages which showed photos of known protesters were set-up and left active for weeks, in order for authorities to track them down and arrest them. Each of the pictures was 'checked off' as the protesters were captured.
Produced by a journalist who worked undercover in the country for three months to expose the tactics used by government authorities, the film, 'Shouting In The Dark', also includes graphic evidence of killings, torture and other forms of physical violence.
Footage of a funeral march that ended in fatal shootings by government troops and an attack on a hospital by tanks and helicopters are shown in the film. It also depicts riot police abducting protesters from their homes, and protesters describing their horrific experiences.
The Al Jazeera journalist who produced the film said in a statement:
"This is the complete story of a revolution which was shot completely undercover, at times at personal risk ... I went completely underground removing the SIM cards from my phones and moving from place to place and showing up to peoples' homes alone and unannounced because the government so tightly monitors all communications and tracks journalists using their phones."
Shouting in the Dark will be broadcast on Al Jazeera English at 2100 BST on SKY guide 514, Freeview 89 and Freesat 203 and online.
Suggested For You
Get top stories and blog posts emailed to me each day. Newsletters may offer personalized content or advertisements. Learn more