Mastering the Internet (MTI) is a mass surveillance project led by the British communications intelligence agency Government Communications Headquarters (GCHQ), with a budget of over £1 billion. According to reports in The Register and The Sunday Times, as of early May 2009, contracts with a total value of £200m had already been awarded to suppliers. 
Responding to these reports, GCHQ issued a press release countering these claims of mass surveillance, stating that "GCHQ is not developing technology to enable the monitoring of all internet use and phone calls in Britain, or to target everyone in the UK".
However, the 2013 mass surveillance disclosures revealed that the GCHQ gathers “raw” information (without filtering out the communications of British citizens) from the web as part of its "Mastering the Internet" programme.
"Mastering the Internet" (MTI) is part of the Interception Modernisation Programme (IMP) of the British government. The system was described in 2009 by The Register and The Sunday Times as the replacement for scrapped plans for a single central database, involving thousands of DPI black boxes at various internet service providers in association with the GCHQ base in Cheltenham, funded out of a Single Intelligence Account budget of £1.6 bn, including a £200m contract with Lockheed Martin and a contract with BAE Systems Detica.
As early as 2007, John Adams, chief of Canada's intelligence agency Communications Security Establishment, told the Parliament of Canada about plans of the "Five Eyes" to master the Internet in cooperation with the NSA and other allies:
We want to master the Internet. That is a challenge that no one institution — be it ours or the National Security Agency, NSA, for that matter — can manage on their own. We try to do that in conjunction with our allies.
In 2013, The Guardian provided specific details of financial contributions made by the U.S. National Security Agency (NSA) in "Mastering the Internet", as part of the "Five Eyes" alliance between several English-speaking Western democracies. According to documents leaked by Edward Snowden, the NSA paid the GCHQ over £17.2 million to run the programme.
- Communications Capabilities Development Programme
- Global Telecoms Exploitation
- Mass surveillance in the United Kingdom
- "Mastering the internet: how GCHQ set out to spy on the world wide web". The Guardian. 21 June 2013.
- GCHQ taps fibre-optic cables for secret access to world's communications, The Guardian,21 Jun 2013. Retrieved Jul 2013.
- David Leppard and Chris Williams (3 May 2009). "Jacqui Smith's secret plan to carry on snooping". The Sunday Times. Retrieved 3 May 2009.
- Chris Williams (3 May 2009). "Jacqui's secret plan to 'Master the Internet'". The Register. Retrieved 3 May 2009.
- "Government 'not planning to monitor all web use'". The Daily Telegraph. 4 May 2009. Retrieved 4 May 2009.
- Tom Whitehead. "Americans pay GCHQ £100m to spy for them, leaked papers claim". The Daily Telegraph. Retrieved 19 October 2013. Italic or bold markup not allowed in:
- Christopher Williams (3 May 2009). "Jacqui's secret plan to 'Master the Internet':'Climb down' on central database was 'a sideshow'". The Register.
- Henry Porter. "GCHQ revelations: mastery of the internet will mean mastery of everyone". The Guardian. Retrieved 19 October 2013. Italic or bold markup not allowed in:
- "Proceedings of the Standing Senate Committee on National Security and Defence". Parliament of Canada. 30 April 2007.