Asian Cup: Tajikistan stun UAE on penalties to reach quarter-finals
Alisher Shukurov buried the final spot-kick in Doha to send the Central Asians - ranked 106th in the world - into a showdown with either Jordan or the 2007 champions Iraq.
Tajikistan goalkeeper Rustam Yatimov saved from Caio Canedo with the UAE's second penalty of the shootout.
Tajikistan looked set for a famous victory when Vakhdat Khanonov scored with a 30th-minute header, only for Khalifa Al-Hammadi to equalise in the 95th minute and send the game into extra-time.
The UAE reached the semi-finals at the last two Asian Cups but Paulo Bento's side bow out to a Tajikistan side ranked more than 40 places lower than them.
Led by charismatic Croat Petar Segrt, Tajikistan drew with China and beat Lebanon in the first round to advance as Group A runners-up.
They will learn who they play in the quarter-finals when Iraq take on Jordan in the last 16 on Monday.
UAE made a bright start and Tajikistan goalkeeper Yatimov had to be switched on to turn a fierce Fabio Lima free kick round the post as early as the second minute.
But the UAE suffered a blow when midfielder Abdalla Ramadan went down with a knee injury and had to be replaced in the 16th minute.
Tajikistan came close to opening the scoring soon after when Shervoni Mabatshoev poked the ball past onrushing goalkeeper Khalid Eisa but saw it roll wide of the post.
Khanonov got the job done 10 minutes later, climbing above Canedo to connect with a header that Eisa fumbled over the line.
The UAE made all the running early in the second half but Tajikistan had the first real chance when Ehson Panjshanbe forced a save from Eisa.
Alisher Dzhalilov was wasteful when he blazed wide with the goal at his mercy after making a lung-busting run to get into the box in the 71st minute.
The UAE hit the post in injury time before Hammadi notched a dramatic equaliser, rising to head home Ali Saleh's free kick and send the game into extra time.
Australia became the first team to qualify for the last eight when they beat Indonesia 4-0 earlier on Sunday.