Tanzanian children aged 15 and over will soon be able to get tested for HIV without needing parental consent.
It is hoped that dropping the minimum age requirement from 18 to 15 will help reduce HIV rates among young people - who currently account for 40% of new infections.
Self-testing kits will also be available for the first time, which the health ministry hopes will encourage men who are often unwilling to visit dedicated health centres where counselling is given before the test.
"We have some challenges among men... because of fear and other reasons, but statistics also show that the youth are the ones getting new infections," Deputy Health Minister Faustine Ndugulile told parliament.
Officials say 1.4 million Tanzanians are known to be living with the virus.
The bill now awaits presidential assent, a formality which will see it brought into law.
Tanzania isn’t alone in implementing these changes - in Uganda self-testing kits are readily available and under-18s do not require parental consent.