Sudan goalkeeper Akram El Hadi saved two penalties in the shootout as his side beat Libya to finish third at the African Nations Championship (CHAN).
The sides were locked at 1-1 after 90 minutes in Marrakech at the tournament for locally-based players.
Akram had earlier failed to deal with the cross from which Salem Ablo headed in an equaliser for Libya with just six minutes to play.
Sudan took the lead on eight minutes when Walaa Eldin Musa headed in.
In the shootout, Sudan converted all four of their penalties while Libyans Elmehdi Elhouni and Ablo were foiled by Akram.
It is a second bronze medal for Sudan at the CHAN finals after they were third when they hosted the tournament in 2011, while Libya were champions three years later.