If left untreated, mothers with HIV have a 15-45 per cent chance of transmitting the virus to their children during pregnancy, childbirth or while breastfeeding.

But taking antiretroviral drugs during pregnancy significantly reduces those chances to just over one per cent.

In 2000, Thailand became one of the first countries in the world to provide free antiretroviral medication to all pregnant women diagnosed with HIV.

Screening for the virus during pregnancy is also routine, even in the country's most remote areas, the WHO added.

According to Thai government figures, the number of babies born with HIV has dropped from 1,000 in 2000 to just 85 last year, a large enough fall for the WHO to declare mother-to-child transmission over.

A small number of cases are taken into account, as treatment with medicine is not 100 per cent effective.

It is a major turnaround for Thailand. The country went from 100,000 HIV cases in 1990 to more than a million three years later, fuelled in part by its huge sex trade.

Health workers initially struggled to persuade governments to act.

But an eventual push to distribute free condoms among sex workers throughout the late 1990s and the widespread rollout of antiretroviral drugs in the 2000s has seen huge success and won the country widespread praise.

"Thailand's progress shows how much can be achieved when science and medicine are underpinned by sustained political commitment," UNAIDS Executive Director Michel Sidibe said in a statement.

But there is still work to be done. The UN estimates there are some 500,000 living with HIV in the kingdom, while infection rates have risen slightly in recent years, particularly among gay men.

Each year, 1.4 million women living with HIV around the world become pregnant.

The number of children born annually with HIV was 400,000 in 2009. By 2013, the number was down to 240,000.