(CNN) -- The World Health Organization commended China for repealing a 20-year-old ban on foreigners with HIV and AIDS from entering the country.
The ban also restricts entry and travel for people with sexually transmitted diseases and leprosy.
"China's decision to categorically remove HIV/AIDS from the list of conditions subject to entry restrictions is a significant step in the right direction," said Dr. Margaret Chan, WHO's director-general. "This decision should inspire other nations to change laws and policies that continue to discriminate against people living with HIV."
China's state-run news agency Xinhua said the country's State Council decided to repeal the ban after realizing it did little to prevent the spread of disease and caused problems when the country was hosting international events.
The revision came days before the opening of the six-month Shanghai World Expo, which organizers expect will draw more than 70 million people. About 190 countries are taking part in the event.
The government had previously lifted the ban temporarily for other large-scale events, including the 2008 Olympics in Beijing.
Xinhua said the health ministry estimates the number of people living with HIV in China had reached 740,000 by October 2009, with deaths caused by AIDS totaling 49,845 since the first case was reported in 1985.
China's decision comes several months after the U.S. Department of Health and Human Services and the Centers for Disease Control and Prevention removed HIV infection from the list of diseases that prevent non-U.S. citizens from entering the country.
Until January, the U.S. was one of seven countries with laws barring entry of people with HIV, according to amfAR, an AIDS research organization.