The East African Court of Justice has dismissed a case which challenged the Constitutional Amendment Bill, removing the age limit to contesting the presidency in Uganda.
This means President Yoweri Museveni is allowed to stand for re-election.
Ugandan lawyer Male Mabirizi had petitioned the country’s Supreme Court, which upheld the amendment, after which he took matters to the regional court.
The change in the constitution removed the requirement for anyone wishing to stand for the presidency to be aged between 35 and 75 years.
Mr Mabirizi had also challenged the process by which the law was passed by parliament in 2017, which was marred by punch-ups on the floor of the house, and an invasion by the military special forces.
The regional court in Arusha, Tanzania, has ruled that the process through which the bill was passed did not violate the East African Community treaty.
If the court had ruled in favour of the petitioner, it would have left President Museveni’s candidature for the 2021 elections in the balance.
BBC