Nigeria overcame Libya 3-2 in the 2019 Africa Cup of Nations (AFCON) qualification Group E match at the Stade Taïeb Mhiri in Tunisia on Tuesday.
As a result, the Super Eagles moved to the top of the group standings, while the Mediterranean Knights remained third on the table.
Libya's Mediterranean Knights were looking to avenge the 4-0 defeat to the Super Eagles of Nigeria in a match which was played in Uyo over the weekend.
The Super Eagles got off to the best possible start as they took an early through their in-form marksman Odion Ighalo 13 minutes into the game.
The China-based forward, who had netted a hat-trick against Libya in Uyo, scored with a tap in to make it 1-0 to Nigeria following a great move by the visitors.
It was soon 2-0 to the Super Eagles with the Mediterranean Knights struggling to contain the Gernot Rohr's side.
Long-serving Super Eagles forward Ahmed Musa was the man, who doubled Nigeria's lead following an impressive counter-attack in the 17th minute.
The hosts grew in confidence as the match progressed and they managed to pull one back through Mohamed Zubya.
The 29-year-old forward beat Nigeria goalkeeper Francis Uzoho to make it 2-1 with 10 minutes left before the half-time break.
Nigeria were leading 2-1 at the interval following a lively first-half in Sfax.
The hosts came back rejuvenated after their half-time team talk with their Omar Al Maryami, who is serving as Libya's caretaker coach.
Mohammed Abdussalam forced Uzoho into a great save - pushing the ball away nine minutes after the restart.
Libya pressed Nigeria with Ahmad Benali working tirelessly for the hosts and they managed to pull one back in the 74th minute.
Parity was restored by Italy-based Benali, who beat Uzoho with a low shot to make it 2-2 for Libya after the Super Eagles had failed to clear their lines.
However, the Mediterranean Knights went to sleep and they were punished by the Super Eagles with nine minutes left on the clock.
Ighalo controlled the ball brilliantly, before firing past Libya goalkeeper Ahmed Azzaga to make it 3-2 to Nigeria.
Nigeria were then able to contain Libya in the dying minutes of the game and ultimately, they emerged 3-2 winners on the night.
Libya (1) 2 (Zubya 35', Benali 74')
Nigeria (2) 3 (Ighalo 13', 81', Musa 17')
Libya XI: Azzaga, Maatok, Al-Warfali, El-Monir, El Trbi, Ahmad Benali, Ali Elmusrati, Tajouri-Shradi (Alshadi 64'), Zubya, Saltou, Sola (Bader 34').
Nigeria XI: Uzoho, Aina, Balogun, Troost-Ekong, Collins, Ndidi, Etebo (Ogu 74'), Iwobi (Ajayi 90'+3), Ahmed Musa, Kalu (Onyekuru 80'), Ighalo.