Zambia won a penalty shootout over Uganda on Saturday to qualify for a chance to defend their African Nations Cup title in South Africa next January.
Twenty kicks were needed before the continental champions advanced 9-8 on penalties after losing the second leg of their final round qualifier 1-0 to their hosts in Kampala.
Patrick Ochan missed the key kick in the post-match shootout amid an atmosphere of spiraling tension as Uganda threw away an early advantage and again missed out on qualification by the narrowest of margins.
They had been well placed after losing just 1-0 in Ndola in last month's first leg tie and leveled the aggregate score after 27 minutes on Saturday through Geoffrey Massa.
But a second goal proved elusive for Uganda, coached by Scotsman Bobby Willimason, despite the urgings of the capacity crowd as Zambia goalkeeper Kennedy Mweene produced a series of heroic saves to keep his side in the tie.
The match went to penalties after 90 minutes and immediately Zambia captain Chris Katongo, who had been their catalyst in winning the last Nations Cup, had the first kick saved.
But Uganda quickly ceded the early advantage and, after the penalties went into sudden death, were forced to keep scoring to stay in the contest, a pressure that proved too much for Ochan.
Zambia won this year's Nations Cup with a penalty shootout triumph over the Ivory Coast in the final in Libreville, Gabon.
Uganda narrowly missed out on a place at the last finals when they failed to win at home in their last group qualifier. They last competed at the Nations Cup in 1978, when they were runners-up.
Earlier on Saturday both Ghana and Mali, semi-finalists at the last event, booked their places. Another 12 berths will be decided over the weekend at the conclusion of a brief qualifying campaign for the 2013 finals in South Africa.
(For more sports news and updates, follow Ahram Online Sports on Twitter at @AO Sports and on Facebook at AhramOnlineSports)