Charles Farr, the director-general of the Office for Security and Counter-Terrorism, revealed in legal documents that, under U.K. law, some social media and even email are legitimate targets of surveillance for the government as they are not considered domestic communications.

British spies can legally monitor its citizens' Facebook , Twitter and Google activities without a warrant, the U.K.'s top counter-terrorism chief revealed.

The disclosure was made in a 48-page document released as part of a legal challenge brought last year from several privacy groups against Britain's spy agencies. The groups, which include Privacy International and Amnesty, claim the mass surveillance activities of the U.S. and Britain revealed by former National Security Agency contractor Edward Snowden were illegal.

Read MoreUK spies to share data with businesses



Farr's statement is the first time the government has admitted to targeting social media and other electronic communications.

The law used by the intelligence agencies is the U.K.'s Regulation of Investigatory Powers Act (RIPA). Under the law, spy agencies must obtain a legal warrant to monitor so-called "internal communications" between British residents located in the country and only if they suspect the person in question of unlawful activity.

But under a more grey area of the law called "section 8.4", authorities do not require such stringent checks and can obtain a general warrant to monitor "external communications".

Using this part of the law, Farr said the government can monitor Twitter, Facebook, Google searches and emails since the information which is being transmitted from the U.K., such as a Google search, is then being sent to servers across the world before returning to Britain.

Read MoreUK, US under fire for Angry Birds spy claims



Farr continually stated that the surveillance methods are crucial to keeping the U.K. safe from terrorists.