Cairo - Tunisia ended Madagascar's fairy tale Africa Cup of Nations run in the quarter-finals on Thursday with a 3-0 win over the tournament debutants in Cairo.
Ferjani Sassi's heavily deflected strike gave Tunisia the lead early in the second half at Al Salam Stadium and Youssef Msakni squeezed home a second on 60 minutes.
Naim Sliti added a third in injury time to send Tunisia through to a semi-final showdown with Sadio Mane's Senegal, with the Carthage Eagles into the last four for the first time since clinching their only title when they hosted the 2004 edition.
"We're the first to beat Madagascar. We had to do it to qualify and that proves the quality of this team," said Tunisia coach Alain Giresse.
"When you get to this stage, for which Tunisia was waiting for several years... We want to go as far as possible. We haven't stolen it from anyone, we deserve it."
Madagascar coach Nicolas Dupuis, whose contract was set to expire at the end of the competition, admitted Tunisia were simply too strong.
"I'm very proud of what the players have done since the start of the tournament. I tip my hat to them," said Dupuis.
"Today the step was too high. As for my future, it doesn't matter much. I'm someone loyal and my priority is Madagascar."
Giresse recalled Wahbi Khazri to Tunisia's attack as the lone change to the side that overcame Ghana in a last-16 penalty shootout, while Marco Ilaimaharitra returned from suspension as Madagascar fielded the same team used throughout the group phase.
Tunisia, the continent's second-ranked side at 25th in the world, had reached the quarter-finals here without winning a single game following four successive draws.
After matches in Suez and Ismailia, this was a first Cairo outing for the north Africans, who controlled possession early on, but didn't truly threaten until a sweetly struck Khazri free-kick was superbly flicked onto the bar by Madagascar goalkeeper Melvin Adrien.
Ghailene Chaalali forced Adrien to push an awkward low shot behind while Mouez Hassen, apologetic after his angry reaction to being substituted ahead of the shootout in the last round, was largely untested except from a long-range Ibrahim Amada effort.
Madagascar were trying to become the first newcomers since South Africa in 1996 to reach the semi-finals, but their hopes were effectively extinguished by the hour.
Khazri had a goal disallowed for offside straight after half-time, but Sassi struck minutes later when his tame shot from the edge of the area hit Thomas Fontaine and spun past a helpless Adrien.
Msakni promptly doubled Tunisia's advantage, jumping on a rebound to slip the ball low beyond Adrien moments after he parried a shot from Khazri.
Charles Andriamahitsinoro, who scored twice for Madagascar in the group stage, looked to be through on goal after a long punt forward but failed to muster a shot. Amada was unable to reproduce his wonder strike from the DR Congo tie as he sliced wide from distance.
This was the first competitive meeting between the countries in almost two decades, and while Dupuis has transformed Madagascar from a team once ranked 190th, Sliti's injury-time goal, created by a long Khazri run on the counter, ensured it was the end of a remarkable adventure for the 'Barea'.