Qatar beat Saudi Arabia 2-0 on Thursday to finish top of Group E in an Asian Cup match that garnered more attention for geopolitics than sporting rivalry.
The derby clash was the first time the two sides had met since a bitter political dispute began between the Gulf Arab states 18 months ago.
Saudi Arabia, joined by the United Arab Emirates, Egypt and Bahrain, cut ties with Qatar in June 2017 over allegations it supports terrorism, a charge Doha denies.
A brace by forward Almoez Ali was enough to see the Qataris past "the Green Falcons" in front of an almost entirely pro-Saudi 16,067 crowd.
Qataris are largely banned from the UAE but "the Maroons" enjoyed the support of some fans from Oman, a fellow Gulf country that has stayed neutral in the regional dispute.
Ali scored a goal in each half, after Qatar captain Hassan Al Haydos had missed a penalty three minutes before halftime.
Ali beat the offside trap to slot the ball past Mohammed Al Owais in first-half stoppage time before being left unmarked to score a close-range header in the 80th minute.
Qatar now face 2007 Asian Cup champions Iraq in the knockout stage. Saudi Arabia, finishing second in the group, meet 2011 champions Japan.
"Every game is going to be hard," Qatar head coach Felix Sanchez told reporters. "We don't consider ourselves favourites."
Saudi Arabian coach Juan Pizzi criticised his team's poor performance in front of goal and said individual errors cost them a game where they controlled possession.
Saudi Arabian forward Fahad Almuwallad had an opportunity to open the scoring in the 22nd minute when he beat the keeper only to be denied by the post.
Qatar had a goal disallowed in a contentious decision in the 59th minute. The Video Assistant Referee (VAR) system is being introduced in the knockout stage of the tournament.
Despite the political context, the match was mostly played in good spirit with players from both sides appearing to be extra polite after committing fouls in the early stages.
But at the end of the match Saudi forward Mohammed Alsaiari was seen pushing some of the celebrating Qatar players, gesturing for them to leave the pitch.
Pizzi declined to comment on the incident, telling reporters it had "nothing to do with football."