Five members of a drill music group have been slapped with tough restrictions on their lyrics, videos and performances in a landmark case.

In what is believed to be the first order of its kind, the judge on Friday also banned the group from making music with violent lyrics and ordered them to inform police about upcoming videos and shows.

They have also been banned from mentioning death or injury in their songs or on social media.

The gang members who are part of the 1011 drill group - based in Ladbroke Grove, west London - have had millions of views on YouTube with tracks in the genre linked to a rise in violent crime.

Yonas Girma, 21, Micah Bedeau, 19, Isaac Marshall, 18, Jordan Bedeau, 17, and Rhys Herbert, 17, were issued with three-year criminal behaviour orders by Scotland Yard’s Trident gang crime unit after they were locked up for conspiracy to commit violent disorder.

Police have connected the genre of rap music - which often features masked or hooded groups talking about guns, drugs and stabbings - with a rise in violent crime in the capital.

The orders say that, on social media and in music videos and performances, the men must not encourage violence, mention named postcodes in a gang context, or make reference to the death of Teewiz, the nickname of 19-year-old Abdullahi Tarabi, who was fatally stabbed in west London.

They must also notify police within 24 hours of releasing new videos and give 48 hours warning of the date and location of any performance or recording and permit officers to attend.

The men must also not possess balaclavas or attend Notting Hill Carnival.

Freedom of expression campaigners criticised the move.

Index on Censorship chief executive Jodie Ginsberg said: "Banning a kind of music is not the way to handle ideas or opinions that are distasteful or disturbing.

"This isn't going to address the issues that lead to the creation of this kind of music, nor should we be creating a precedent in which certain forms of art which include violent images or ideas are banned. We need to tackle actual violence, not ideas and opinions."

Scotland Yard is taking on the genre, with Metropolitan Police Commissioner Cressida Dick blaming social media for fuelling a surge in murders in London and singling out drill.

The force has a database of more than 1,400 videos for intelligence and in the past two years has asked YouTube to remove up to 60 of them.

The men hit with the ban were arrested on November 9 in Colville Square, Notting Hill, after an investigation into their music and social media accounts.

Police suspected they were planning to attack a rival group, 12 World, while armed with four large machetes, baseball bats, masks, balaclavas and gloves.

The defendants said they were on their way to make a music video when they were arrested and the weapons were simply props, but the judge said it averted a "very serious violent incident" between two gangs.

They admitted the lesser charge having denied counts of conspiracy to commit grievous bodily harm with intent.

Girma, of Hounslow Road, Hanworth, Marshall, of Ladbroke Grove, Herbert, of Lonsdale Road, Notting Hill, and brothers Jordan and Micah Bedeau, of Colville Square, are serving jail or detention sentences for between 10 months and three-and-a-half years.