Bahrain have ended their Asian Cup campaign with a 2-1 win over Qatar to ensure a third-place finish in Group C above their Gulf rivals.
Defeats in their opening two matches to Iran and the United Arab Emirates ensured neither side could progress to the quarter-final stages.
Despite this, the 4,841 people that rattled around the 83,000-capacity venue were greeted to an open, attacking game that produced a number of chances for both sides.
Bahrain started the stronger, with naturalised Nigerian striker John Okunwanne heading straight at Buhran Qasem when being picked out unmarked in the box by a Faouzi Aaish cross in the sixth minute.
Qatar's lightning-fast 21-year-old Ghana-born Mohammed Muntari was a constant threat in attack and was unlucky not to have won a penalty for his side when his was felled by Husain Mohammed only for referee Abdullah Mohamed Al Hilali from Oman to wave play on.
Muntari then saw a flashing effort fly just wide of Hamad Aldoseri's left post and was denied by the crossbar when his header clipped the top of the woodwork following a quickly-taken free kick by Hasan Al Haydos.
Bahrain, boosted by that let off, broke forward again with man of the match Aaish crossing perfectly with the outside of his right foot to find Sayed Shubbar at the back of the six-yard box - but the midfielder's diving header crashed back off the base of the post.
Five minutes before halftime, Shubbar did find the target with a smart turn and finish following a weaving run into the box by Aaish.
The second half followed a similar pattern with neither side showing any real desire to defend but it was Qatar who produced the better scoring chances.
Muntari missed to gilt-edged chances when bearing down on goal and Ali Asad should have done better when clean through on goal, but shot lacked any composure and Aldoseri did well to block his effort.
Qatar finally got the goal they deserved midway through the second period when Al Haydos' low free kick deflected off the foot of Bahrain skipper Husain Mohamed and into the bottom left-hand corner.
The game appeared to petering out for 1-1 draw, but nine minutes from time Sayed Ahmed's cross-shot, floated over the outstretched hand of Qasem and into the top-left-hand corner to seal the win.
Bahrain coach Marjan Eid said the win was a crucial for his players' confidence and was full of praise for way Ahmed finished his winning strike at ANZ Stadium.
"We needed to win this: this is important for the team and for me," Eid said.
"They were tired from the last two matches but the most important thing was that they took the three points.
"The goal was maybe a bit lucky, but he had the vision and awareness to spot the goalkeeper off his line to score."
Qatar coach Djamel Belmadi rued the number of missed opportunities by his side and said his worst fears were confirmed when Bahrain grabbed the late winner.
"When you miss chances, it is due to many things," Belmadi said.
"It's partly luck, concentration and quality of the player.
"We created opportunities but we did not score. From my experiences as a player, when you create a lot of chances and do not score, you usually lose the game.
"I always worry about these type of games."