Great Britain's men reached the Olympic hockey semi-finals for the first time since 1988 after a tense 1-1 draw with Spain in their final group match.
The home side will take on the Netherlands in the semis on Thursday.
Britain needed a point to progress and Ashley Jackson gave them a 1-0 lead at half-time, but Pau Quemada equalised after the break as Spain piled forward.
Spain's players were furious at the final whistle after two late penalty corners were overturned.
Having failed to convert three set-pieces in the closing minutes, one brilliantly saved by Britain's James Fair in goal, Spain were awarded another with just 26 seconds left on the clock.
However, amid protests from the British players - who had no video referrals remaining - the umpire reversed the decision after consulting his colleague, prompting angry exchanges with the Spanish players at the end.
Video replays suggested both decisions were ultimately correct, but Spain coach Dani Martin said: "I feel that the FIH (International Hockey Federation) needs to take these things very seriously because this is a very serious situation.
"It cannot happen that an international official changes his decision twice - especially as he is surrounded by opposition players. It has already happened before in other matches that an umpire has been surrounded by players.
"We are in a tournament where there are clear favourites and these countries are being favoured.
"If the president of the FIH (Leandro Negre) does not give a public explanation of what has happened there will be very serious consequences."
As the match had begun, the only storm brewing appeared to be above the Riverbank Arena as Britain's players began confidently.
Jackson and Harry Martin both went close before the former made the breakthrough with a low strike from a penalty corner.
If the game plan had worked perfectly in the first half, after the break it all became a bit ragged as the prize of a semi-final place loomed large.
James Tindall went close in the 53rd minute before the resultant corner prompted a scramble, which ended with the ball hitting the Spain crossbar.
However, the British players then retreated and struggled to retain possession, inviting waves of pressure from Spain. It was no great surprise when the visitors equalised from a penalty corner with 25 minutes remaining.
Fair's superb save from yet another Spanish set-piece with just three minutes left brought a huge roar from the 16,000 spectators, and looked to have done the job, but the agony for the home crowd was prolonged until the dying seconds.
There were jubilant scenes on one side and anger on the other when the match came to an end, and Britain will know they must step up their game considerably against the unbeaten Netherlands.
"We fancy our chances against the Dutch," said Jackson. "They've had a great tournament. They're top of their pool. Hopefully the tough games we've had here will put us in better stead. I know it's going to be a tough game."
Olympic champions Germany take on world number one side Australia in the other semi-final on Thursday.