The South African researchers compared solely breastfed babies with those also given formula or solid foods.
They say breastfeeding carries a low transmission risk, but protects against potentially fatal conditions such as diarrhoea and pneumonia.
They say it is the best option for most women in the developing world.
Breastfeeding remains a key intervention to reduce mortality
Professor Hoosen Coovadia, researcher
In the developed world, the risk of mother-to-child HIV transmission has been cut from 25% to under 2% because of the use of antiretroviral therapies, exclusive formula feeding and good healthcare support.
But these benefits are often unavailable in the developing world.
There, World Health Organization (WHO) guidance says HIV positive women who can afford to use formula, and who have the facilities they need to do so - such as a fire to heat water with - should do so.
But the researchers, from the Africa Centre for Health and Population Studies at the University of KwaZulu-Natal, say this is not the case for the majority of women in developing countries.
For this reason, and because exclusively breastfeeding protects against other diseases, they suggest it is the best option.
It is also associated with fewer breast health problems such as mastitis and breast abscesses, both of which can increase the amount of the HIV virus in the mother's breast milk.
The research, funded by the UK's Wellcome Trust, found that there was a 4% risk of postnatal transmission to infants who were just fed on breast milk between the age of six weeks and six months.
Infants who received formula milk or animal milk in addition to breast milk were nearly twice as likely to be infected as infants who received breast milk only.
And those given solids in addition to breast milk were almost 11 times more likely to acquire infection.
It is thought that this higher risk is due to the larger, more complex proteins found in solid foods which may lead to greater damage to the lining of the stomach, allowing the virus to pass through the gut wall.
Professor Hoosen Coovadia, of the Africa Centre, said: "The question of whether or not to breastfeed is not a straightforward one.
"We know that breastfeeding carries with it a risk of transmitting HIV infection from mother to child, but breastfeeding remains a key intervention to reduce mortality.
"In many areas of Africa where poverty is endemic, replacement feed, such as formula milk or animal milk, is expensive and cannot act as a complete substitute.
"The key is to find ways of making breastfeeding safe."
Writing in the Lancet, Wendy Holmes of the Centre for International Health in Melbourne and Felicity Savage of the equivalent institution in London say the research is a "breakthrough".
"It provides crucial confirmatory evidence that when HIV-positive mothers breastfeed exclusively, their babies have only a low risk of infection with HIV.
"This risk is lower that that in babies who receive other food or liquids in addition to breast milk before six months."
Drs Holmes and Savage added: "The results emphasise that promotion of exclusive breastfeeding for all mothers and babies could prevent much paediatric HIV infection as well as deaths from other causes."
SOURCE : BBC News