Ziyed Chennoufi and Nizar Knioua inspired Tunisia to AfroBasket glory as they defeated defending champions Nigeria 77-65 in front of a partisan home crowd.
Nigeria headed into Saturday's showdown at the Salle Omnisports de Rades as the top scorers in the 2017 tournament, but Alex Nwora's men fell short when it mattered.
The stars of the show for the joint-hosts were Chennoufi and Knioua, who contributed 19 and 16 points respectively as Tunisia won AfroBasket for the first time since 2011.
It could have been a different story had Nigeria built on a solid start that saw them lead 14-8 after the first quarter, but Tunisia had edged ahead by a point at half-time.
And it was a lead they would not relinquish as Tunisia opened up a 15-point advantage in the middle of the third.
Nigeria trimmed that to seven in the last quarter, but a huge three-pointer from Omar Abada left the title out of their grasp.
In the third-place play-off match, Senegal - joint hosts with Tunisia - defeated Morocco 73-62.