Genki Haraguchi smashed home a controversial penalty as former champions Japan scraped a 1-0 win over Oman to book their place in the last 16 of the Asian Cup on Sunday.
Earlier, Almoez Ali plundered four goals for Qatar as the 2022 World Cup hosts hit North Korea for six to progress from Group E.
Japan, who have scooped Asian football's biggest prize on four occasions, enjoyed their share of good fortune against Oman in Abu Dhabi.
Haraguchi clipped the crossbar after just two minutes before Takumi Minamino fluffed a handful of golden opportunities.
That profligacy almost came back to haunt the Blue Samurai as Oman flooded forward and Muhsen Al-Ghassani shaved the post from an acute angle.
But Haraguchi settled Japan's nerves in the 28th minute, converting from the spot after he had appeared to go down easily under minimal contact from Oman captain Ahmed Al-Mahaijri.
Oman had extra reason to feel aggrieved when their own penalty claims were waved away just before half-time after Yuto Nagatomo looked to have handled a Salaah Al-Yahyaei drive.
"We were unlucky with the handball," shrugged Oman coach Pim Verbeek, whose team were beaten 2-1 by Uzbekistan last week.
"I just saw it again on the television and for me it was 100 percent a penalty. Against a team like Japan you need a little bit of luck and we didn't get it. Now we have to pick ourselves up for the last game and make Oman proud."
Japan reached the knockout stages of last year's World Cup but they squeaked past Turkmenistan 3-2 in their opening Group F game and were poor against Oman, who almost equalised when Raed Saleh's acrobatic late volley flashed wide.
But the Japanese remain unbeaten in seven matches since Hajime Moriyasu took charge after the World Cup and have now lost just one of their last 30 games at the Asian Cup, excluding penalty shootouts.
Japan are seeking to make up for their Asian Cup flop four years ago when they lost on penalties to the United Arab Emirates in the quarter-finals.
But they will need to find another gear if they are to threaten Iran, who are purring, and a South Korea side boosted by the arrival of Tottenham forward Son Heung-min.
"We made life a little difficult for ourselves by not taking our chances," said Moriyasu.
"We have achieved out first aim which was to get through the group but we know we will need to improve if we want to win the title."
Qatar's 6-0 romp over North Korea was played out in an almost eery silence in front of barely 300 spectators in Al Ain.
The long-running blockade of Qatar by Gulf neighbours who accuse Doha of supporting terrorism largely prohibits Qataris from entering the UAE.
"The players know this is the scenario and they deal with it," said Qatar coach Felix Sanchez.
"We don't have our supporters here but we know that they're supporting from Qatar."
Ali took his tally to a tournament-best five goals with two in each half, completing this Asian Cup's first hat-trick by dinking the ball over goalkeeper Kim Myong Guk 10 minutes after the interval.
His salvo equalled an Asian Cup record as he became the fourth player to score four goals in one game.
Qatar, who beat Lebanon 2-0 in their opening game, top the group on goal difference from three-time champions Saudi Arabia.
North Korea have failed to find the net once and conceded 10 times in a pair of performances that will not please Pyongyang.
The Saudis have also sealed their place in the knockout stage from Group E after two straight wins.
Uzbekistan were playing Turkmenistan in a clash of former Soviet republics in Dubai later on Sunday.
Japan will take on either Saudi Arabia or Qatar after qualifying for the knockout stage for the eighth consecutive time.