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-1at 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.
Have your say
More Sports Headlines
- 'Messi the best in every world' – Boateng turns back on Ronaldo allegiances
- Ronaldo accepts €18.8m deal over tax evasion
- Emiliano Sala: Cardiff City player on missing plane
- Tsitsipas reaches Australian Open semi-finals
- New Barcelona signing Boateng 'a little sad' to leave Sassuolo
- Boateng becomes first Ghanaian, 14th African to join Barcelona
- OFFICIAL: Barcelona announce loan signing of Kevin-Prince Boateng
- Boateng confirms surprise move to Barcelona
- Barcelona to sign Kevin-Prince Boateng from Sassuolo
- Serena Williams knocks out Simona Halep in epic Australian Open clash
- CAF CC: Kotoko draw Al Hilal, Zesco and Nkana in group stage
- CAF CL: Sundowns beat Wydad as Mazembe lose in Algeria
- Solomon Akumba wins Maltavator Challenge Season 2
- CAF CC: Kotoko players to receive $500 each qualification bonus
- Ashgold thrash Medeama to win Betway Cup