Tanzania hold Tunisia to end 45-year wait for AFCON knockout spot
Ismael Gharbi converted a penalty just before half-time for Tunisia and Feisal Salum levelled early in the second half in the Moroccan capital.
Tanzania have been trying since 1980 to advance beyond the group stage, and have still to win a match in four appearances. They squeezed into the round of 16 after two draws and one loss.
Tunisia finished second in Group C with four points, five less than table-toppers Nigeria. Tanzania pipped Angola on goals scored for one of four places reserved for third-placed teams.