"It's crazy," said Lucas Anagua, 17, a fan in the crowds at Praca do Comercio, the main square in Lisbon where the game had been shown on huge screens. "I'm going to party tonight."
Fireworks and music broke out across the capital, where the game, won 1-0 by Portugal, had been shown on television screens on a blistering hot summer night.
Substitute Eder secured the win with a goal in extra time.
"I maintained the faith," President Marcelo Rebelo de Sousa told RTP television. "We were able to put up with everything. This was Portugal at its best."
Cars beeped their horns and thousands of people filled the streets, donning the Portuguese flag and shouting "Portugal, Portugal, Portugal."
"This is the most amazing thing I've ever seen," said another fan.
The win helped make up for Portugal's loss to underdog Greece when it hosted the Euro 12 years ago. The country's last major soccer conquest was in 2006, when Portugal finished fourth in the World Cup.
"The victory for the national side is recognition of the value of Portuguese soccer and gives prestige to our country," said the Portuguese Football Association in a statement.
For a country that suffered hard under Europe's debt crisis but is now recovering economically under its new Socialist government, the victory will be a welcome relief.
The victory was especially sweet because captain Cristiano Ronaldo was forced to leave the game after suffering an injury in the first half, leaving Portugal's team without its star.
Related news: