Google and Microsoft have reached an agreement with the UK government and the creative industries that aims to limit access to pirated films, TV shows, and music online.

The US search engine operators have signed up to a crackdown that will see the UK’s copyright watchdog monitor the search results they provide for unlawful websites.

Under the initiative, the tech giants have promised to demote websites that have repeatedly been served with copyright infringement notices, so that they do not appear on the first page for common searches. Also, search engine autocomplete functions – the time-saving feature that suggests what users may be looking for – should also remove terms that may lead to pirate websites.

The agreement comes after many years of campaigning by record labels and film studios, which have accused Google and Microsoft (the company behind search engine Bing) of having a lax approach to the issue of piracy and creating measures to protect copyright online.

Matt Hancock, the digital economy minister, said, "We are one of the world’s leading digital nations, and we have a responsibility to make sure that consumers have easy access to legal content online. Pirate sites deprive artists and rights holders of hard-earned income and I’m delighted to see industry led solutions like this landmark agreement which will be instrumental in driving change."

As well as movies and music, organisations such as the Premier League have also indicated agreement to the proposals, with live sport also featuring high on the list of illegal streams.

At the moment the code is voluntary, but compliance by the tech companies will be monitored by the Intellectual Property Office (IPO) over the next few months. In the summer the watchdog could recommend further action, potentially triggering legislation that imposes fines and other sanctions, reports the Telegraph.

Geoff Taylor, chief executive of BPI, which represents record labels, said the code would not be a silver bullet for copyright holders.

He said: “We have long campaigned for search engines to do more to ensure fans are directed to legal sources for music or other entertainment. There is much work still to do to achieve this. The Code will not be a silver bullet fix, but it will mean that illegal sites are demoted more quickly from search results and that fans searching for music are more likely to find a fair site.”