United Arab Emirates struck in stoppage time through Faisal Khalil to beat Qatar 2-1 in Asian Cup Group B on Monday.
Qatar needed victory to reach the quarter-finals after drawing their games against Japan and co-hosts Vietnam, and defeat left them bottom of the standings.
Also read: Japan storm into Asian Cup quarters
Qatar coach Dzemaludin Musovic remained upbeat, saying his young team could be successful in the future.
"Now it is not easy to analyse the reasons, it was a delicate situation...they (UAE) had new players, it was difficult," he told reporters.
United Arab Emirates, out of contention after losing to Japan and Vietnam, leapt above Qatar into third place.
Qatar had looked to be on their way into the last eight when Uruguay-born striker Sebastian Quintana converted a penalty three minutes before halftime.
Quintana, who scored against both Japan and Vietnam, won the spot-kick himself and stepped up to stroke the ball home.
The referee ordered him to retake the penalty because Qatar players had encroached into the area and Quintana smashed his second effort into the roof of the net.
UAE went on the attack after the interval and were rewarded on 59 minutes when striker Saeed Alkas headed home a cross.
They continued to enjoy the bulk of possession and the pressure told deep into stoppage time when Ismail Mataar's free kick was headed into the net by Khalil following a deflection.