Uganda qualified for the 2019 Africa Cup of Nations after beating Cape Verde 1-0 in Kampala on Saturday.
Patrick Kaddu scored the all-important goal late on for the Cranes, who needed to avoid defeat to go through.
Uganda, who had spent nearly 40 years failing to qualify for the Nations Cup, will now contest back-to-back tournaments for the first time since the seventies.
Tanzania can take Group L's second spot if they win in Lesotho on Sunday.
Should they succeed in Maseru, Tanzania would celebrate only their second Nations Cup qualification - and first since 1980.
"I thank God that I scored the only goal that takes Uganda through to the Nations Cup," said striker Kaddu, who headed home Allan Kyambadde's fine cross six minutes from time.
Uganda boast 13 points in Group L, way ahead of second-placed Tanzania, who have five points, while Cape Verde have four and Lesotho two.
Uganda's Cranes, meanwhile, did reach three tournaments in a row, culminating in both contesting and losing the 1978 final, prior to their lengthy absence.
They picked up their first Nations Cup goal and point in decades when drawing with Mali at the 2017 finals - and will hope for more in Cameroon next June.
Group L concludes in March when Tanzania host Uganda and Lesotho travel to Cape Verde.
Elsewhere, Namibia were held to a goalless draw by Guinea-Bissau in Windhoek meaning that Group K will be decided on the final day.
Both sides have eight points, four more than Mozambique and Zambia who meet in Maputo on Sunday.
A win for either side would fire them into contention ahead of the final day in March when Guinea-Bissau host Mozambique and Namibia travel to Zambia.
The Gambia also lifted themselves back into the reckoning after winning 3-1 at home to Benin in Group D.
The Baby Scorpions join Togo on five points, two behind joint leaders Algeria and Benin.
The North Africans can increase their lead should they beat Togo in Lome on Sunday.