(CNN) -- Japan recovered from having a player sent off to snatch a last-gasp 3-2 win over Asian Cup hosts Qatar in Doha and reach the semifinals on Friday.
Masahiko Inoha's late goal ended Qatar's hopes of qualifying for the last four of the competition for the first time, and maintained Japan's dream of earning a record fourth title.
Albert Zaccheroni's team will next face either Group D winners Iran or Group C runners-up South Korea, who face off on Saturday.
"After we lost a man we still had more possession," the Italian coach told the Asian Cup website. "It was a great comeback and I could see the good mentality from our players.
"Even though we were a man down, normally teams think about defense, but we didn't -- we had the bravery to keep attacking."
Qatar, ranked 105th in the world, had reached the knockout stage for just the second time in seven appearances and looked capable of going one better than 2000's last-eight showing when substitute Fabio Cesar made it 2-1 straight after Maya Yoshida's 62nd-minute dismissal.
But Japan battled back as Shinji Kagawa equalized with 20 minutes to play, and the striker was also involved when Inoha scored at the death.
Qatar took the lead in the 12th minute when Uruguay-born striker Sebastian Soria beat the offside trap, cut inside past defender Inoha and fired past goalkeeper Eiji Kawashima.
Japan, the second-highest ranked team at the 16-team tournament behind fellow 2010 World Cup qualifiers Australia, leveled in the 28th minute through Kagawa.
The 21-year-old, who plays for German league leaders Borussia Dortmund, headed home a cross by Shinji Okazaki as the teams went to the break on equal terms.
But that balance of power was disrupted 17 minutes after halftime when Yoshida fouled Yusef Ahmed on the edge of the penalty area and Cesar curled in a low effort from the resulting freekick.
However, Kagawa claimed his second as he went past Mesaad Ali and beat goalkeeper Qasem Burhan, then his late burst into the box resulted in the ball running free to fullback Inoha for the goal that put Japan through.
Qatar coach Bruno Metsu said he would let his players recharge before the beginning of qualifiers for the 2014 World Cup in June.
"We will use the time to let the players rest and raise their morale, because they were disappointed to lose. We can be proud of how we played," the Frenchman said.
"We frightened them and we were very skilful. We have shown the whole world that Qatar is a strong team. We showed that we can play good football, although we still made mistakes and we conceded goals because of these mistakes."
Group A winners Uzbekistan beat Group B runners-up Jordan 2-1 in Friday's second quarterfinal in front of 16,000 fans at Doha's 40,000-capacity Khalifa Stadium.
Uzbekistan will next face either Australia or defending champions Iraq after reaching the semis for the first time, having made it to the last eight in 2004 and 2007.
After a goalless first half, the "White Wolves" scored twice in two minutes after the break as striker Ulugbek Bakaev netted on 47 and 49.
The 32-year-old, who played for Russain club CSKA Moscow earlier in his career, broke the deadlock with a header from captain Server Djeparov's free-kick and then stole in at the near post to convert a low cross.
Jordan, also seeking to reach the semifinals for the first time, hit back through Bashar Bani Yaseen in the 57th minute when the defender pounced on a loose ball to score from close range.