Thomas Ulimwengu nodded a quick throw-in past goalkeeper Dele Ajiboye eight minutes from full time at Uhuru Stadium to give the home team a fortunate third-round, first-leg victory.
Nigeria, among the most impressive national U-23 teams in Africa after scoring 16 goals in their last four competitive matches, had much more of the ball only to squander several good scoring chances.
Coach expects turnaround
But coach Austin Eguavoen remains confident of progress, promising to beat the team that stunned Cameroon in the previous round when they meet again this month in Abuja.
"We lost despite being the better team and it will be a different story when we host the return match - I promise Nigerians that my boys will score five goals," said the former national team star.
Tanzania coach Jamhuri Kihwelu remains hopeful of claiming another high-profile victim in a competition restricted to U-23 footballers until the finals, when three over-age 'wild cards' can be fielded.
A couple of substitutions revitalised the home team and Fadel Suanon struck twice within three minutes before half-time and William Dassagate added a third early in the second half with a fierce drive past helpless Darren Keet.
It was a bad weekend for teams from the south of the continent as Zambia crashed 3-0 in Algeria, where Sid Ahmed Aouadj scored in each half and Djamel Belamri got the other goal in first-half stoppage time.
Côte d'Ivoire overcome Congo
Côte d'Ivoire recovered impressively from the setback of falling behind just four minutes into the first half in Brazzaville to defeat Congo 2-1 and take a giant step toward reaching the mini-league final phase scheduled for December.
Ernest Maboto scored for the Congolese but Lacina Traore levelled and Cheick Toure snatched the winner for a team coached by former goalkeeper Alain Gouamene, who helped Côte d'Ivoire lift the 1992 Africa Cup of Nations.
A late Abderazak Hamdallah goal earned Morocco a 2-1 home win over Congo DR while the Sudan-Egypt, Gabon-Mali and Tunisia-Senegal matches ended goalless.