The security service MI5 and the electronic interception centre GCHQ have been asked by the government to join the hunt for people who organised last week's riots, the Guardian has learned.

The agencies, the bulk of whose work normally involves catching terrorists inspired by al-Qaida, are helping the effort to catch people who used social messaging, especially BlackBerry Messenger (BBM), to mobilise looters.

A key difficulty for law enforcers last week was cracking the high level of encryption on the BBM system. BBM is a pin-protected instant message system that is only accessible to BlackBerry users.

MI5 and GCHQ will also help the effort to try to get ahead of any further organisation of disturbances. The move represents a change as officially MI5 is tasked with ensuring the national security of the United Kingdom from terrorist threats, weapons of mass destruction, and espionage, with the police taking the lead on maintaining public order.

However, they have a statutory right to target criminals or those suspected of being involved in crime, officials have said.

Police struggled to access the BBM network last week, though some who were sent messages planning violence were so outraged they passed them on to law enforcement agencies.

GCHQ's computers and listening devices can pick up audio messages and BBM communications. MI5 and the police can identify the owners with the help of mobile companies and internet service providers. The agencies can intercept electronic and phone messages, identify where they have been sent from and their destination. That allows other investigations to take place and other efforts to develop intelligence.

One source said: "The hope is this will boost the intelligence available. It always useful to get some boffins in."

In his speech on Monday David Cameron made no mention of his threatened clampdown on social media. Last week in the House of Commons emergency debate, he said: "There was an awful lot of hoaxes and false trails made on Twitter and BlackBerry Messenger and the rest of it. We need a major piece of work to make sure that the police have all the technological capabilities they need to hunt down and beat the criminals." One of MI5's functions under the 1989 Security Service Act is to support "the activities of police forces … and other law enforcement agencies in the prevention and detection of serious crime".

MI5 intercepts communications though officially can only do so with warrants signed by ministers. It seeks technical help from GCHQ.

GCHQ's functions, according to the 1994 Intelligence Services Act, include "to monitor or interfere with electromagnetic, acoustic and other emissions and any equipment producing such emissions and to obtain and provide information derived from or related to such emissions or equipment … "

It can do so "in support of the prevention or detection of serious crime".

On its website, MI5 stresses such a distinction: "For the most part the activities of domestic extremists pose a threat to public order, but not to national security. They are generally investigated by the police, not the Security Service."

For law enforcement, the difficulty with BBM is that it boasts semi-private – and instant – access to a network of like-minded users.

BlackBerry handsets are the smartphone of choice for the 37% of British teenagers, according to Ofcom. BBM allows users to send the same message to a network of contacts connected by "BBM pins". For many teenagers, BBM has replaced text messaging because it is free and instant.

Unlike Twitter or Facebook, many BBM messages are untraceable by the authorities. And unlike Facebook, friends are connected either by individual pin numbers or a registered email address. In short, BlackBerry Messenger is more secure than almost all other social networks.

So-called "broadcasts" can be sent to hundreds of disparate users within minutes, away from the attention of law enforcement agencies.

In the 12 years since it released the first BlackBerry, Research in Motion (RIM) has built a formidable reputation for the impenetrable security of its smartphones. RIM has always struggled to explain to the authorities that, unlike most other companies, it technically cannot access or read the majority of the messages sent by users over its network.

One of the biggest problems for law enforcement in the digital age is the inability to get real-time access to messages sent by potential criminals.

In England, RIM has said it will actively cooperate with law enforcement as they investigate those behind the unrest. Although it cannot hand to police the contents of rioters' messages, it can disclose information that could assist any investigation.

A clause in the Data Protection Act allows RIM to disclose the names, contacts and times of prominent BlackBerry Messenger users in a certain area and at a certain time.