President Andry Rajoelina wants Madagascar to "look to the future" and says the team can "come back stronger in the next competitions", after the Barea's fairy-tale run was halted at the Africa Cup of Nations.
The president, who was in the crowd at the Cairo stadium, saw his country lose 3-0 to Tunisia in the quarter finals.
This was Madagascar's first Afcon finals and before the competition the team was ranked 108th in the world by Fifa.
One of the tournament highlights so far was Madagascar's 2-0 defeat of Nigeria.
"Congratulations to the Barea for this exceptional run. Even if the defeat is hard, we are proud of this #CAN2019", the president said on Twitter.
The Carthage Eagles, who will face Senegal in Sunday's semi final, led through Ferjani Sassi's deflected shot from the edge of the box.
Youssef Msakni then doubled their lead after Wahbi Khazri's shot was parried by Melvin Adrien.
Naim Sliti added an injury-time third to cap off a counter-attack as Madagascar sent players forward.
Madagascar had to start Afcon qualifying in the preliminary round in March 2017, but went on to stun Nigeria in the tournament's group stages and then Democratic Republic of Congo in the last 16.
Their squad contains players who play in Reunion, the French lower leagues and Thailand. Their head coach Nicolas Dupuis also manages French fourth-tier Fleury.
But their dream came to an end as they were well beaten by a professional Tunisia performance in Cairo.
Thursday's other game saw Algeria reach the semi-finals by beating Ivory Coast 4-3 on penalties following a 1-1 draw after extra time.
Algeria, seeking a first Afcon triumph since 1990, will now meet Nigeria in Cairo on Sunday.