Zambia left it until late on Saturday at home to book their place at the Total African Nations Championship (CHAN) Kenya 2018 after beating South Africa 2-0 at the Levy Mwanawasa Stadium in Ndola.
A brace from Justin Shonga in the last ten minutes of the second half sealed Chipolopolo's passage to their third finals in the history of the competition designed exclusively for footballers playing in their domestic leagues, 4-2 win on aggregate.
Zambia dominated the first half but South Africa's Bonginkosi Ntuli gave them an early scare in the fourth minute, and goalkeeper Toaster Nsabata proved equal with a superb save.
Three minutes later, the host came close to taking the lead when Augustine Mulenga saw his teasing shot come off the post.
Mulenga, who had been in the midst of most of Zambia's forays, then limped off in the 44th minute with an injury, and had to be replaced by John Chingandu.
Prior to that, the Chipolopolo saw chances go begging from Alex Ngonga in the 24th minute and Shonga three minutes later.
Bafana Bafana attacked sporadically and Roscoe Pietersen saw his 28th minute header cleared off the line whilst Ntuli fired wide from close range on the half-hour mark.
The South Africans improved after the break with Ntuli again denied by Nsabata in the 49th minute while Dumisani Zuma saw his seemingly goal-bound effort land on the roof of the Zambians net.
Shonga then broke Bafana's hearts with two quick goals when he fired in the first in the 80th minute before adding the second three minutes later from close range.
This is Zambia's second straight CHAN finals after reaching the quarterfinals in 2016 in Rwanda. The Chipolopolo finished third at the inaugural edition in 2009 in Cote d'Ivoire.
The final tournament will take place from 12 January to 4 February 2018 in Kenya.
Source: Confederation Africaine de Football