A thundering out-of-the-blue shot by substitute Eder gave Portugal a shock 1-0 win over France in the European Championship final, delivering the country's first international title as superstar Cristiano Ronaldo watched injured from the touchline.
Ronaldo was stretchered off in tears in the first half and limped on crying with joy again after his side delivered the final knockout blow in the month-long tournament of upsets.
Hosts France dominated the game, as they had nearly every match since the start. But they could not break down a Portuguese defence in which man-of-the-match Pepe was majestic and goalkeeper Rui Patricio produced a string of dramatic saves.
"It was not the final I wanted but I am very happy. It is a trophy for all Portuguese, for all immigrants, all the people who believed in us so I am very happy and very proud," said Ronaldo.
Up against a French team with a whole nation behind them, Portugal healed their own football wound from a shock they suffered twelve years ago. In the 2004 Euro final, Portugal lost to Greece 1-0 on home territory.
Portugal can now expect a momentous national welcome when they return to Lisbon and a tickertape parade through the capital on Monday.
Portugal's coach Fernando Santos and the other players paid tribute to Ronaldo's role in urging the team not to give up in the tense match at the Stade de France. Ronaldo returned from treatment at the end of 90 minutes to give pep talks to his teammates.
He fell the ground in agony in the eighth minute following a clattering challenge from Dimitri Payet. After twice going off for treatment and trying to come back, Ronaldo was definitively carried off.
"He told me I was going to score the winning goal," said Eder who plays for French side Lille and only went on in the 79th minute. "He gave me strength and positive energy."
Victory also gave Ronaldo energy. He danced past reporters with other Portugal players as they left the stadium.
"Cristiano is fundamental to us," said Santos. "It would be utopian to not use Ronaldo and all his added value.
"Cristiano could score at any moment and sort everything out on his own but I always said we are a team - we win as a team."
Portugal defended doggedly and threatened occasionally without their inspirational skipper. With 109 minutes gone, Eder beat off a Laurent Koscielny challenge to fire a shot from outside the penalty area that French captain and goalkeeper Hugo Lloris could not even get a hand to.
The tournament featuring 24 teams for the first time failed to produce classic football. And Lloris was the latest to raise questions about the manner of Portugal's wins.
"If they won the tournament it is because they deserved it," Lloris said.
But he described France's luck as "cruel" and added "one can always argue about the way they play, but they are efficient and you must congratulate them."
Santos had always said he does not care if Portugal win "ugly" as long as they win.
The 51 games produced 108 goals, one of the lowest averages for recent international tournaments. The quality was not memorable. But the upset results will go down in history.
Iceland stunned England 2-1, Wales beat Belgium 3-1 in a classic quarter-final and Portugal will long celebrate their win in a stadium that was invaded by swarms of moths.
France started the match as strong favourites after beating Germany 2-0 in the semi-final. Antoine Griezmann scored twice in that game to take his tournament total to a Golden Boot winning six goals.
But the striker who has spent his entire career in Spain and has never played in the French league could not penetrate the Portugal defence. His early header drew a finger-tip save from Rui Patricio.
Griezmann said defeat had been a double blow as he also missed a penalty in Atletico Madrid's defeat to arch-rivals Real Madrid in the Champions League final seven weeks ago.
Moussa Sissoko also drove a thundering shot over the bar while French substitute Andre-Pierre Gignac sent an extra time shot against the post.
"The disappointment is there and it's immense," French coach Didier Deschamps said. "We've let a big chance to be champions pass us by."
Deschamps contract runs until 2018 and the World Cup in Russia. He said he would take time to "digest" the disappointment before thinking about his own future.
France spent 450 million euros ($500 million) preparing 10 stadiums for Euro 2016 which could be the last hosted in one country. Euro 2020, the 16th tournament, will be held in 13 cities in 13 different countries from Azerbaijan to Wales.
Despite some doubts about the 24-country format, UEFA's executive committee "praised the competitiveness of the competition" in a statement after a meeting on Saturday.
Substitute Eder's thunderous finish deep into extra time secured Portugal's first European Championship title after they overcame the early loss of Cristiano Ronaldo to snatch a 1-0 smash-and-grab victory over hosts France on Sunday.
Eder picked the perfect moment to score his first competitive goal for his country, marauding forward before letting fly with a bullet shot from 25 metres in the 109th minute.
It was a cruel blow for France, who had dominated the match from and squandered a number of chances, in front of their devastated home support, who arrived at the Stade de France hoping to celebrate a third European crown.
The trophy was lifted by Ronaldo, who broke down in tears at the final whistle but whose game had come to a frustrating end after 24 minutes when he was carried crying from the pitch on a stretcher with a knee injury.
So much of the build-up had focused on Ronaldo and his hopes of crowning a glittering career with the only achievement missing from his CV, a piece of international silverware.
The script had been written for him to produce a performance to match his status as one of the game's truly great talents, but he had to settle for a back-stage role after Dimitri Payet's challenge left him in a heap on the floor.
Prior to his departure, it had been a fast-paced start with France's Moussa Sissoko a bullish presence in midfield, frequently charging through tackles and bursting into the box.
His 34th-minute shot was well-parried by Patricio, but by that point the match had settled into a pattern of France probing and pushing but struggling to break down their more defensively-minded opponents.
Without Ronaldo, Portugal seemed in no hurry to rush the ball forward, happy to see the game descend into a cagey, tactical battle.
They had a scare, however, in the 67th minute when Kingsley Coman's cross found Antoine Griezmann unmarked six metres from goal, only for the tournament's top scorer to head a golden opportunity over.
Minutes later, Olivier Giroud, fed by sprightly substitute Coman, forced a diving save from Patricio, who then parried away a pile-driver from Sissoko as France turned the screw.
France's best chance of the night arrived in stoppage time when substitute Andre-Pierre Gignac turned his marker inside out before scuffing a shot past the keeper and against the post, with the ball bouncing across the face of goal and then out of harm's way.
While Portugal continued to sit back in extra time, they had the better chances with Eder's header parried by Hugo Lloris and Raphael Guerreiro striking the crossbar with a free kick before Eder's moment of magic.
Portugal beats France 1-0 after extra time in the final to win the 2016 European Championship.
Eder scores in the 109th minute for Portugal vs France in the Euro 16 final.
The Euro 2016 final between Portugal and France on Sunday went into extra time with the teams level at 0-0 after 90 minutes.
Portugal captain Cristiano Ronaldo was taken off injured after 24 minutes of the European Championship final against France on Sunday.
Ronaldo, who tried to play on with a bandaged knee after a tackle by Dimitri Payet in the early stages of the game, was replaced by Ricardo Quaresma.