Defending champions Australia crashed out of the Asian Cup on Friday when a contentious Ali Mabkhout goal earned hosts the United Arab Emirates a 1-0 victory and a semifinal meeting with Qatar next week.
Mabkhout struck midway through the second half after Milos Degenek under-hit a pass back to Mat Ryan, and the Al Jazira man swooped to round the goalkeeper and slot the ball into an empty net for his ninth goal in two Asian Cups.
The Australians complained Degenek had been fouled prior to giving away possession by Mohammed Abdulrahman, but Japanese referee Ryuji Sato waved away the protests and the goal stood.
"Milos didn't get a minute at the World Cup, but he has stepped up at this tournament and done fantastically well," said Australia coach Graham Arnold.
"Obviously he's hurting at the moment but I'll make sure he's OK.
"He's a fantastic kid, a fantastic professional and he's got a long future with the Australian national team."
Victory means Alberto Zaccheroni's side will move on to a potentially politically sensitive semifinal against their Arabian Gulf neighbours, who earlier stunned South Korea 1-0.
Saudi Arabia, the UAE, Bahrain and Egypt launched a diplomatic and trade boycott of Qatar in June 2017. The countries accuse Qatar of supporting terrorism, which it denies.
The political rift between Qatar and the UAE meant the Maroons were supported by only a couple of hundred Omanis but they celebrated wildly in front of them at the final whistle.
The UAE's progress was vindication of Zaccheroni's decision to make five changes from the side that edged Kyrgyzstan in the previous round, with veteran striker Ismaeil Mattar making his first start of the tournament.
The home side who looked comfortable despite the changes and within a minute of kickoff almost took the lead. Ismail Al Hammadi flew through the Australian defence, but Ryan was equal to his goal-bound effort.
Al Hammadi threatened again 19 minutes later, with Ryan called into action again after the winger had stepped inside Australia's backline.
The Socceroos threatened, too, in an open and entertaining first half.
Trent Sainsbury looped an early header over the bar and Apostolos Giannou forced a save from Khalid Essa five minutes before the break.
Mabkhout, though, should have scored in the dying seconds of the half, only for his close range header to fizz over the crossbar.
He made amends after halftime when he capitalised on Degenek's poor pass to give his side the lead.
Australia coach Graham Arnold threw on strikers Awer Mabil and Andrew Nabbout in a last-ditch attempt to take the game into extra time. However, the UAE held firm to avenge their loss to the Socceroos in the semifinals four years ago in Australia.
Qatar's Abdulaziz Hatem scored with a stunning late strike as the 2022 World Cup hosts upset Son Heung-min's South Korea to set up the semifinal.
The defensive midfielder's left-footed shot came out of the blue in the 78th minute and flew past South Korea goalkeeper Kim Seung-gyu to decide a largely disappointing contest in front of a crowd of only 13,700 at Zayed Sport City.
Twice former champions South Korea poured forward to try and rescue the match but were unable to produce an equaliser.
"We've achieved something special today, this is history for us," said Qatar coach Felix Sanchez, whose team will go into the semifinal without having conceded a goal.
"We played a great game, the players made a huge effort and we achieved something great for our country.
"I'm the happiest coach in the world."
Pre-tournament favourites South Korea, who had been looking to reach the last four for a record-extending 11th time, bowed out before the semifinals for the first time since 2004.
Both teams had played their last 16 matches on Tuesday, which perhaps contributed to a forgettable first half with just one shot on target -- Akram Afif's long-range effort after 32 minutes which South Korea keeper Kim safely gathered.
The Qataris, who started with five at the back, came out with more attacking intent in the second half but were almost immediately caught on the break with Hwang Ui-jo forcing a save out of Saad Al Sheeb.
The game was opening up with chances at both ends and Son, who had looked fatigued since joining the South Korean squad for their third group game, started to impose his influence.
The Tottenham Hotspur forward got a low drive on target in the 72nd minute which went straight to Saad and made a decoy run before Kim Jin-su curled the ball onto the outside of the post from a free kick three minutes later.
Just when it looked like the Koreans might be getting on top, though, the ball broke for Hatem in midfield and seconds later it was nestled in the bottom right-hand corner of the South Korean net.
Hwang Ui-jo had the ball in the back of the opposite net two minutes later but was ruled offside, a decision confirmed by the video assistant referee, and Qatar held on to secure a famous victory.
"We tried to dominate the game as we had in our previous matches but they were very well-organised," South Korea's Portuguese coach Paulo Bento said after suffering his first defeat in 12 matches in charge.
"We were eliminated because we weren't efficient enough in converting our opportunities into goals."