When a south London teenager uploaded a series of amateur rap videos to YouTube, he had no reason to believe they would make legal history.

But the videos, a vivid account of life "on the road" in Peckham for a young black male, quickly gained millions of views. In one, 18-year-old Matt raps about stabbing, saying: "You're always chatting on, you should feel a piece of the knife, stabbing in your head, stabbing in your chest."

In another video, teenagers make gestures and call out gang names. It was not long before the authorities took notice: last year Matt became the first person in England and Wales to be banned by law from producing music or videos that encourage violence.

Southwark council, which took out the injunction against Matt, believes YouTube has become the "new playground" for gang members. "By all means we want people to use social media, but we do not want you to use it in ways that will incite violence," said Jonathan Toy, Southwark council's head of community safety. "This remains a big issue for us and without some form of censorship purely focusing on [violent videos], I'm not sure how we can address it."

Julia Farrington, head of arts at Index on Censorship, argues that extra powers to ban violent videos online will "end up too broad and open to misapplication, which would damage freedom of expression".

But the purported rise in violent videos online has led some MPs to campaign for courts to have more power to remove or block material on YouTube. The Labour MP Heidi Alexander said she was appalled after a constituent was robbed at knifepoint, and the attackers could be found brandishing weapons and rapping about gang violence online.

Thousands of violent videos are still available on the internet, according to Alexander, who claims they lead to an escalation in offline tensions between rival gangs. "I believe some young people are losing their lives as result of this material on the internet," she said.

She maintains that the internet should face similar curbs to TV because young people are increasingly living online. "It's totally different, someone at Google watching the video from the comfort of their office in San Francisco to someone from a council house in London, where this video is happening right outside their front door."

Alexander says she has been accused of censorship "worse than a Syrian dictator" over her quest to have gang-related videos taken down. But her campaign shows the debate over a completely unfettered internet is not clear-cut.

The shift in the balance of power online has allowed anyone to publish to the world, from dispirited teenagers in south London to an anonymous cyber-dissident in a Middle East autocracy.

In Saudi Arabia, one of the most conservative societies, one online rebel has rocked the Islamic establishment with tweeted allegations of corruption within the ruling royal family.

"Mujtahidd" has attracted almost 300,000 followers since the end of last year, when he began posting scandalous claims about the Saudi elite. In one tweet, Mujtahidd directly challenged Prince Abdul Aziz Bin Fahd about his political history: "Did you resign or were you forced to resign from your post as head of the diwan [office] of the council of ministers?"

The online rebel later threatened to expose alleged hypocrisy by some members of the royal family over the kingdom's housing shortage. "One of the owners of vast tracts of land has close to 500m square metres!! … Everybody knows this," railed Mujtahidd in a swipe at another Saudi prince.

Speaking to the Guardian on condition of anonymity, the person behind the Mujtahidd Twitter account said he would be arrested if the authorities were able to track him down. He said he aimed to "make people aware that they are fooled by [a] very efficient deception campaign" and that the anger of young Saudis was "on the verge of explosion".

"I keep myself anonymous not only for security but for other reasons," he said in an email. "In our society people are less biased and more ready to believe sensitive information when they see it bare and not linked to a known person. They are also more ready to interact and redistribute the information when the source is anonymous because of the sensitivity."

Mujtahidd's online claims have prompted an aggressive backlash against social media from the Saudi religious establishment. The grand mufti of Saudi Arabia, Sheikh Abdul-Aziz al-Sheikh, said in January that Twitter was a platform for "promoting lies" and a "dangerous practice" that should be avoided by Muslims. Commentators have described the phenomenon as symbolic of the growing political debate about use of Twitter in Saudi Arabia.

Dr Saad al-Faqih, leader of the Movement for Islamic Reform in Arabia, said that the Saudi establishment was increasingly under threat from a growing army of Twitter users who dare speak out online.

There were an estimated 127,500 Twitter users in Saudi Arabia in September last year, according to the Arab Social Media report published by the Dubai school of government, out of a total of 140 million users worldwide.

"Thanks to Mujtahidd, Twitter is now a household name in Saudi Arabia," said Abdulkhaleq Abdulla, a professor at Emirates University in Dubai. "His revelations about corruption at the highest level made Twitter popular and sharpened debate about the role of new social media in one of the most conservative societies on Earth today. The government is at the moment at a loss as to what to do with Twitter. They do not like what they see and hear but there is not much they can do."

The growing use of social media to spread anger and dissent in the Arab world has been hailed by western governments as one of the chief justifications for a completely unfettered internet. The US is reportedly funding the secret rollout of technology in Iran in an effort to undermine internet censors in the country.

However, some have accused cyberspace of provoking a dangerous collapse in the old order of civilised society. The shift in the balance of power online has given rise to a more powerful concern: the rise of the uncivil web.

When the Bolton Wanderers footballer Fabrice Muamba collapsed during a televised Premier League match last month, broadcasters decided not to replay shocking pictures of the player lying face down on the pitch having a cardiac arrest. On the internet, there was no such inhibition. People flocked to YouTube, where videos of Muamba's trauma were viewed millions of times by people unconcerned that they were watching a young man on the verge of death.

Other global taboos, such as sex and suicide, manifest themselves widely online, with websites offering suicide guides and Hot XXX Action seconds away at the click of a button. The UK government will come under pressure to block access to pornographic websites this year when a committee of MPs publishes its report on protecting children online.

The Conservative MP Claire Perry claims to have strong cross-party support for her campaign, which would mean that British internet users would have to ask their service providers to unblock hardcore porn sites on their computer. "We have relied on internet providers to offer filters for porn for 20 years and it has not worked," said Perry. "This is having a big impact on children and there is a real need for an opt-in system."

The unruly net is also playing havoc with the British judiciary. Social media were in direct conflict with the courts in May last year when anonymous Twitter users posted details about an alleged extramarital affair by the footballer Ryan Giggs, in breach of a privacy injunction that had gagged the national media.

It was a perfect irony that British national media had to wait for an MP to use parliamentary privilege – a 300-year-old legal immunity – before they could name Giggs as the footballer whose identity was already well known among their internet-savvy readers.

The furore caused the lord chief justice, Lord Judge, to declare that modern technology was "completely out of control". The attorney general, Dominic Grieve, described the saga as a "phenomenon", but said it was not symbolic of a "serious crisis where the courts are being undermined".

Grieve has faced calls to be more proactive in pursuing legal action against internet users who breach privacy injunctions, but the attorney general said he would intervene only if a case passed a strong public interest test.

"I have to look at things on a case by case basis, but just because somebody breaches an injunction on Facebook … does not automatically mean that has serious consequences. It does not stop gossiping over dinner tables," he said.

"The blunt reality is that somebody who tweets is likely to find themselves in contempt by the party who obtained the order. It is only a matter of time before that happens if people continue behaving this way."

It is not known whether Nicolas Sarkozy read the British press on the day of his address to internet leaders – the same day many newspapers ran front-page stories on the internet phenomenon that outed Giggs – but the ability of cyberspace to topple the establishment is certainly what he had in mind.

The French president told grandees of the online world, including Facebook's Mark Zuckerberg and Google's Eric Schmidt, that the internet was not a "parallel universe, free of legal and moral rules". The old order of the civilised world, Sarkozy observed, had been radically outpaced by the revolution in cyberspace.

"The internet is in danger, and it's getting worse," said Jeff Jarvis, the blogger and one of the internet leaders addressed by Sarkozy in Paris last May. "There are more and more attempts to regulate the internet under the guise of privacy, piracy, security, decency and in Nicolas Sarkozy's case, even civility."

Privately, some at social networks fear that pressure to curb the internet will grow this year, culminating in a major summit held by the UN International Telecommunications Union (ITU) in December. Some internet officials see the summit as a "major power play" by the ITU, which they say wants greater oversight of the web.

Attempts to curb the internet on a global level could spark tensions within the UN. The ITU has said its regulation of technology needs to adapt to the explosion of communication in the virtual world. But the UN body that promotes freedom of expression, Unesco, fears the plans could signal the end of an unfettered internet.

Those plans have gained traction at the Council of Europe, whose head of human rights, Thomas Hammarberg, recently proposed that the UN should set up a special commission that could "filter out porn or incitement to war and hatred".

Guy Berger, Unesco's director for freedom of expression and media, described Hammarberg's proposal as "politically and technically not practical". He added: "Unesco's 195 member states are never likely to want this organisation to become some sort of internet policeman, because its founding mandate is to promote freedom of expression. The antidote to trying to control the internet is to empower the users of the internet.

"Ultimately I don't see any other way that this can be resolved. I don't think it's feasible to really control the internet."

Predictably, Facebook and Twitter are not keen either. Richard Allan, director of policy for Facebook in Europe, said the idea of a global internet policeman was "not an attractive one and one that would scare most of the industry".

The general counsel for Twitter, Alex Macgillivray, is known for describing the microblogging service as "the free-speech wing of the free speech party". He said the internet should remain a "unique place for civil conversation" and that he was optimistic governments would preserve the "wonderful engine of free expression that it is".

While some high-profile internet groups have vowed to avoid the arm of authority at any cost – the Pirate Bay website colourfully announced it would attempt to host some servers on unmanned drones miles above the Earth – others have developed a more sophisticated response to the law. Twitter now has the ability to "withhold" content in specific countries if faced with a legitimate legal request.

This balancing act allows Twitter to keep material online in all jurisdictions outside that specific country, such as France and Germany, where pro-Nazi content is unlawful. However, it is understood that Twitter has not yet removed material in this way since it became able to do so in January.

The fight for control of the borderless expanse of cyberspace has been compared by some to the historic dispute over the rule of the ocean. Like the virtual world, the seas were once free of agreement, jurisdiction and sovereignty. And in 1973, when the UN met in New York for a summit that would eventually produce the law of the sea treaty, the internet was just a research project for a small group of scientists at Stanford University in California.

Vint Cerf, one of the Stanford professors behind a key building block of the internet, believes the time has come for a global discussion on the future of the open web. "We don't have a framework yet that allows us to deal with some of these problems and that's an important discussion to have," he said. "We need to begin thinking about the law of the net in the same way as we think of the law of the sea."

Cerf, now 68 and a vice-president at Google, thinks the offline world has not yet come to terms with what social norms look like online.

The global expanse of cyberspace grows by about 150,000 web pages a day and is used by a third of the world's population. It is the borderless frontier for business, media, politics and warfare – and while autocrats have clamped down on cyberspace, western governments have aligned themselves with virtual dissidents who would face the full force of the law in their own countries.

The boom in the social web has rocked even western governments to their core: it has meant that once-unthinkable curbs on an unfettered internet could soon be on the horizon.