At first, Indonesia were ahead. Then after being pegged back, they took the lead again.
But when they found themselves reduced to ten men, which paved the way for Vietnam to equalise once again, the Indonesians' hopes of reaching the men's football final at the 32nd Southeast Asian Games looked all but over with the momentum firmly in favour of their opponents.
At the very best, they could hold out till the end of the 90 minutes but even keeping the Vietnamese -- the two-time defending gold medallists -- at bay for a further half and hour and hope for the lottery of the penalty shootout looked a long shot -- especially with the numerical deficit.
Yet, this Indonesia outfit is made of sterner stuff. They had other ideas.
Just when it looked as though extra-time would be on the cards, with the assumption that they would look to run the clock down in the 6th minute of injury-time, they instead went on the attack.
And as an initial attempt was blocked and fell to his path, substitute Taufany Muslihuddin showed nerves of steel as he created a yard of space for himself on the edge of the area with a little feint before firing away an exquisite effort that arrowed into the bottom corner.
Cue wild scenes of celebration from the Indonesian camp, which only intensified moments later when the final whistle blew, signalling a stunning 3-2 win that sent them into the SEA Games gold medal match on Tuesday -- where they will meet either Thailand or Myanmar.
As one of the most impressive teams in the tournament so far, but with Saturday's tie against the Vietnamese arguably their first real test of the tournament, everything about Indonesia came to the fore.
The good, the bad and the ugly.
Their first two goals -- scored by centre-back Komang Teguh and his replacement Muhammad Ferrari , who came on following an injury to the former -- epitomised the sheer attacking threat Indra Sjafri's men have shown throughout the tournament.
On a day when their usually-exploitative attack failed to break down a well-organised backline, they still found a way to score.
From set-play situations as Pratama Arhan unleashed two missile-like long throws, with the first met by Komang's bullet header into the back of the net, while the second caused all sorts of pandemonium with Vietnam goalkeeper Quan Van Chuan only able to punch it out to the edge of the box, allowing Marselino Ferdinan to fire away a ball back towards goal that was cleverly diverted home by Ferrari.
The bad came in the way they did look to be unnerved by the occasion and the opposition, as they struggled to find their usual rhythm even if they still did create a fair share of meaningful forward forays.
Vietnam's second goal was a real case of a lack of composure, as Bagas Kaffa -- in a moment of panic -- completely miscued his attempted clearance to send it past his own goalkeeper Ernando Ari.
And then, there were also ugly scenes which perhaps were to be expected given the high stakes on offer.
It did not take long for tempers to flare and unsavoury clashes at the end of the first half threatened to leave both sides with less than 11 men at the break, although the referee ultimately opted not to flash his red card then.
He eventually did on the hour mark and Arhan can have no complaints, needlessly clipping Nguyen Duc Phu to prevent the Vietnam midfielder from breaking down the right wing and picking up his second booking of the game.
It was an unnecessary challenge and Indra will be disappointed with the lack of discipline shown by his left-back -- who has had an excellent tournament -- as he will now miss the gold medal match.
Nonetheless, all of that - the good, the bad and the ugly - are precisely why this Indonesia outfit have been so well-received at the tournament.
They play with reckless abandon at times and are a breath of fresh air. They are prone to the odd lapse in concentration to allow their opponents a chance, which always makes for an exciting affair.
Most of all, they just do not seem to know how to quit -- even when the odds are firmly against them.
This indomitable spirit is what has got them through to the final. And it may just be what wins them a first SEA Games gold medal since 1991.