BEIJING — China has ruled that all personal computers sold in the country after July 1 must come with software that blocks access to certain websites, giving censors new levels of control.

Green Dam-Youth Escort software would complement existing software that blocks numerous search-engine terms deemed politically sensitive or pornographic.

The news comes at a busy period for the so-called Great Firewall of China, which has blocked websites including video-sharing site YouTube and the social networking service Twitter, to stop postings related to issues such as this month’s 20th anniversary of the Tiananmen Square crackdown.

A report in the Wall Street Journal said the move was mainly aimed at stopping pornography and protecting young people from “harmful” content. Since early this year, the government has been running a major campaign against online smut.

More than 1,900 websites have been shuttered, and websites including Google and Baidu, China’s most popular search engine, were criticized early on for linking to unapproved sites.

The Ministry of Industry and Information Technology issued the software notice to makers of personal computer on May 19. There are concerns the software could also be used to censor political postings, even though its manufacturers say the program can be turned on and off by consumers if they wish.

The software can be used to stop proxy servers or programs that some netizens use to get around website blocks. China has the world’s largest online population at nearly 300 million Web users.