Treatment for hydronephrosis depends on what's causing the condition and how severe it is.
In adults, the aims of treatment are to:
Most people with hydronephrosis will have a procedure called catheterisation to drain the urine from their kidneys.
Depending on the underlying cause, medication or surgery may be needed afterwards to correct the problem.
If the condition is severe or causing problems such as a urinary tract infection (UTI), you may to be treated soon after you're diagnosed.
In less severe cases, it may be safe to delay treatment for a short period.
The first stage in treating hydronephrosis is to drain the urine out of your kidneys.
This will help ease your pain and prevent any further damage to your kidneys.
A thin tube called a catheter may be inserted into your bladder through your urethra (the tube that carries urine out of the body) or directly into your kidney through a small cut in your skin.
Read more about urinary catheterisation.
In a few cases where one of the kidneys has already been severely damaged, it may be better to remove the affected kidney.
Most people can function normally with just one working kidney, which will not usually have a significant effect on your health or lifestyle.
Once the pressure on your kidneys has been relieved, the cause of the build-up of urine may need to be treated.
Some possible causes and their treatments are described below:
If hydronephrosis occurs because you're pregnant, you will not usually need any treatment because the condition will pass within a few weeks of giving birth.
In the meantime, catheters can be regularly used to drain urine from the kidneys.
Painkillers and antibiotics can also be given if you're in pain or develop a UTI.
Most babies diagnosed with hydronephrosis before they're born (antenatal hydronephrosis) will not need any treatment because the condition will improve before they're born or within a few months of their birth.
There's usually no risk to you or your child, so labour should not need to be started early.
After the birth, your baby may be examined to check for any obvious problems, such as swollen kidneys, but normally you'll be able to take them home with you.
Your baby may need to return to hospital for some scans during the next few weeks to check there aren't any continuing problems.
These scans may include:
In most children, hydronephrosis will get better as they get older. But until scans show there's no longer a problem, your child may need to take antibiotics to reduce their chances of developing a UTI as the urine inside their kidneys can make them more vulnerable to infection.
If hydronephrosis does not get better by itself, your child may need to keep taking antibiotics. Occasionally, surgery may be recommended to treat the underlying cause of the condition.