Bernd Storck planned to rest goal hero Zoltan Gera for his side's Euro 2016 Group F closer with Portugal on Wednesday, the Hungary coach has revealed.
With Hungary already through to the next round, Storck intended to give the 37-year-old the night off, but Gera was pressed into action due to injuries to fellow midfielders.
Gera then smashed home a wonderful half-volley to put his side the lead, although Portugal equalised three times to force a draw and also qualify for the last 16.
"I didn't want him to play – I wanted to rest him before the last 16," Storck said.
"But we had two midfielders who were not playing. He's 37 – it was a world-class performance from him."
Storck was not surprised by the "exceptional" team display from Hungary, who will now face Belgium on Sunday for a place in the quarter-finals.
"I was convinced about my team," said Storck. "I knew they could play well.
"But I have to admit that we changed five players. I have replaced several players who had a yellow card and I asked [Krisztian] Nemeth to be very cautious.
"I have 23 players of this level and everyone can replace anyone. The team performance was exceptional.
"We played better. We knew it was going to be very hard. We had to play against an organised team. We wanted to attack and score goals and even if Portugal came back we tried to attack, and we had some luck too.
"It was an excellent game, and shows the progress of the team during the tournament.
"We learn from every game. We played a high-level opponent before the Euros and during the Euros we've improved even more. We're happy we've improved even more against Portugal."