Three-time champions Japan qualified for the 2011 Asian Cup finals after Hirayama Sota's hat-trick earned a 3-2 comeback victory over Yemen.
Bahrain also qualified from Group A after maintaining their perfect record, Ismaeel Abdulatif's first-half hat-trick helping to secure a 4-0 demolition of Hong Kong in Manama.
At the Ali Mohsen Al-Muraisi Stadium in Sana'a, Basem Al Aqel opened the scoring for Yemen - who needed a win to keep their qualification hopes alive - before Sami Karama's 25-yard strike doubled the advantage seven minutes before the break.
But after Sota headed home to pull a goal back for a youthful Japan side three minutes later, the FC Tokyo striker equalised 10 minutes after half-time with a superb turn and finish from inside the area.
And with 11 minutes remaining he converted from close range from Inui Takashi's cross to stun Yemen.
At the Bahrain National Stadium, Abdulatif fired a nine-minute treble to sink Hong Kong.
The lanky striker opened the scoring after 34 minutes when he converted Salman Isa's cross before repeating the trick when he got on the end of Husain Salman's centre six minutes later.
He completed his hat-trick in the 43rd minute after firing Ahmed Hassan's low delivery first-time past keeper Tse Tak Him before Abdullah Al Dakeel added a fourth with 11 minutes to go.