Tunisia have been crowned AfroBasket 2017 champions ©FIBA

Tunisia have been crowned champions of AfroBasket 2017 following a thrilling final on home soil this evening.

The hosts knocked defending champions Nigeria off their perch at the summit of African basketball after recording a 77-65 win at the Salle Omnisport de Rades in Tunis.

Two years ago, at the same venue, Nigeria lost to Tunisia in the group phase but responded with four straight victories to win the trophy for the first time-ever, while Tunisia finished in third.

After trailing by as many as 15 points in the final quarter, Nigeria cut the deficit to 67-59 but a late flurry of Tunisian points sealed victory in the gold medal match.

Ziyed Chennoufi top scored for the champions, registering 19 points.

The Tunisians beat reigning champions Nigeria in the final ©FIBA
The Tunisians beat reigning champions Nigeria in the final ©FIBA

Ike Diogu hit back with 20 for Senegal but his effort was not good enough to avoid defeat.

Diogu was also named the tournament's Most Valuable Player.

Senegal improved on their performance from two years ago to win the bronze medal.

The Senegalese team lost in the third-place playoff in 2015 to Tunisia but secured a place on the podium with a 73-62 win over Morocco today.

Mouhammad Faye and Gorgui Dieng combined for 40 points for Senegal, scoring 22 and 18 respectively.