Children and youths will be banned from viewing pornography in Britain on July 15 under a crackdown requiring pornographic websites to verify users are over 18.

The long-awaited introduction of age restrictions - the first in the world - has been given the go-ahead by Margot James, the digital minister, and will give the industry three months to prepare.

Anyone who visits a porn site from a British IP address will be asked for “proof” they are 18, provided either from ID such as driving licences or from age verification cards bought in shops.

Any website or app that does not comply with the regulations, which are part of the Digital Economy Act, faces being blocked by UK internet service providers or having payment services withdrawn.

All the main porn websites have pledged to introduce age verification schemes, some of which will be done by third parties so the companies have no access to personal data.

The British Board of Film Censors (BBFC) will oversee the new verification system which is aimed to protect children and young people from accessing pornography.