(CNN) Repeatedly delayed age-verification laws aimed at preventing under-18s from viewing online pornography will come into force in the UK in July, the government has announced.

From July 15, commercial porn sites will be legally required to carry out "robust age-verification checks" on their users, to prevent minors from viewing their content.

To access online porn, adults may have to submit ID documents like credit cards or passports to online age-verification providers, or buy a so-called porn pass in person in a shop.

Digital minister Margot James said in a statement: "The introduction of mandatory age-verification is a world-first, and we've taken the time to balance privacy concerns with the need to protect children from inappropriate content."

"We want the UK to be the safest place in the world to be online, and these new laws will help us achieve this," James said.

Read More