Aymen Hussein was sent off moments after putting Iraq within sight of the Asian Cup quarterfinals and Jordan fought back to win 3-2 on Monday.
The striker was shown a second yellow card for excessive celebrations after firing Iraq 2-1 ahead at Khalifa International Stadium.
Down to 10 men, Iraq could not withstand Jordan's fightback and conceded twice in stoppage time to end its hopes of winning the competition for a second time.
Hussein struck in the 76th minute to spark wild celebrations, including him sitting cross-legged on the field and mimicking eating.
Iraq's joy soon turned to frustration, though, when referee Alireza Faghani yellow-carded Hussein for a second time.
A young Jordan supporter poses for a photo outside the stadium in Doha.
It got worse for the 2007 champion when Yazan Al Arab leveled in the fifth minute of added time from a rebound and Nizar Al Rashdan netted the winner from outside the box two minutes later.
Iraq beat pre-tournament favorite Japan and advanced to the knockout stage as the winner of Group D. And, in Hussein, it had the most prolific striker in the competition with five goals.
While Hussein added to that total, his red card proved pivotal as the last-16 match was turned on its head.
Jordan advanced as one of the best third-placed teams and took the lead in the first minute of first-half stoppage time through Yazan Al Naimat.
Iraqi supporters pose for a photo during the match.
Suad Natiq equalised for Iraq with a header in the 68th and Hussein fired low from an angle to put his team ahead. His celebrations, however, were sanctioned.
Jordan plays Tajikistan in the qarterfinals.
QATAR ADVANCE
Akram Afif delivered again for Qatar as the host and defending champion reached the quarterfinals by beating Palestine 2-1.
Afif has established himself as one of the stars of the tournament, and if he can keep up this form he may yet achieve his ambition of joining a European club.
The forward struck from the penalty spot in the 49th - his fourth goal of the Asian Cup — as Qatar came back at Al Bayt Stadium.
Oday Dabbagh put Palestine ahead before halftime from a run into the box and clinical finish. It was the first time Palestine made the knockout stage, but its journey came to an end after goals from Hassan Al Haydos and Afif.
Al Haydos levelled in the sixth minute of first-half stoppage time when converting from Afif's corner via a deflection.
Qatar's winner came after Almoez Ali was fouled by Mohammed Saleh in the box and Afif stepped up to the spot.
Qatar will play either Uzbekistan or Thailand in the quarterfinals.
Associated Press