In Bakau, Gambia and Djibouti drew 1-1 for the second time in five days, leaving the countries deadlocked at 2-2 on aggregate.
Gambia goalkeeper Modou Jobe was the star of the shootout, saving two Djibouti spot-kicks to give his side a 3-2 victory on penalties.
In N'Djamena, Chad beat 10-man Liberia 1-0, the same score by which they lost the first leg in a round that involved eight of the 10 lowest ranked African teams with Eritrea and Somalia not entering.
Chad then proved more accurate from the spot to win 5-4 on penalties and give French coach Emmanuel Tregoat his first win at the fourth attempt in a second spell with the nation.
The other two preliminary round second legs were less nerve jangling with South Sudan winning away to the Seychelles and Sao Tome e Principe at home against Mauritius to book group places.
Djibouti, who are rapidly ditching under French coach Julien Mette a reputation for being whipping boys, shocked Gambia by taking an early lead when Mahdi Mahabeh converted a penalty.
Giving one of their best performances in recent years, the hosts levelled in first half stoppage time through Ablie Jallow.
There were no further goals in regulation time, leaving Jobe from Saudi Arabian club Jeddah to take his country into Group D with Angola, the Democratic Republic of Congo and Gabon.
Liberia suffered a major blow just after half-time when captain Sam Johnson was sent off for a second yellow card and Indonesia-based Ezechiel N'Doussel put Chad ahead soon after.
Elimination was a major setback for new Liberia coach Peter Butler as the Englishman had promised officials he would take the Lone Stars to the 2021 Cup of Nations in Cameroon.
Chad, who have never competed at the biennial elite African tournament, go into Group A with Mali, Guinea and Namibia.
South Sudan came from behind in the first leg to build a tenuous 2-1 aggregate advantage over the Seychelles and won the return match in Victoria via a Joseph Nyuar goal on 71 minutes.
The South Sudanese, who were forced to play the first leg in Sudan because the national stadium in Juba is being renovated, will face Burkina Faso, Uganda and Mali in Group B.
Sao Tome followed up a shock 3-1 away victory over Mauritius by winning 2-1 at home in the tiny twin island nation off the coast of Gabon.
Argentina-based Luis Leal scored again after bagging first-leg brace, and the reward for the Saotomeans is a place in Group C with three former champions, Ghana, South Africa and Sudan.
The first two rounds of group matches are scheduled for November 11-19 and then there is a long break until two more matchdays between August 31-September 8 next year.