Japan cruised into the Asian Cup last 16 on Wednesday and a possible date with South Korea, as already qualified Iraq came out on top in a five-goal thriller.

Ayase Ueda struck in each half to go with a late Indonesia own goal as pre-tournament favourites Japan won 3-1 to finish runners-up in Group D behind Iraq.

Japan will now face the winners of Group E -- South Korea's group.

Jurgen Klinsmann's South Korea are currently second on goal difference behind Jordan and face Malaysia in their final group match on Thursday.

Iran are lurking as possible quarter-final opponents for Japan and coach Hajime Moriyasu said they were primed for the best the rest could throw at them.

"Iran and South Korea are top-level teams in Asia and both very strong. They both have their own style that is different from ours and we respect them," he said.

"It is a step-up in quality as we move into the race for the title."

Moriyasu made eight changes to his starting line-up from the shock 2-1 defeat by Iraq, bringing in an entirely new defence.

He kept faith in goalkeeper Zion Suzuki, who was at fault against Iraq and was racially abused online after the game.

But there was still no place for Brighton winger Kaoru Mitoma, who was left out of the match-day squad for a third straight game as he struggles for full fitness.

Japan were awarded a penalty in the sixth minute after a VAR check ruled that Indonesia defender Jordi Amat had dragged down Ueda in the box.

The Feyenoord striker dusted himself down and dispatched the spot-kick past goalkeeper Ernando Ari.

Japan doubled their lead seven minutes after half-time when Ritsu Doan cut through the Indonesia defence down the wing and Ueda was on hand to tap home his low cross.

Ueda went looking for his hat-trick and his shot pressured Indonesia defender Justin Hubner into firing the ball into his own goal in the 88th minute.

Sandy Walsh volleyed home from close range in the 91st minute to give Indonesia a consolation.

They finished third in the group and will have to wait until the first round concludes on Thursday to see if they go through as one of the four best third-placed teams.

Brave Hussein

The 2007 champions Iraq, who had already topped the group, scored in the 12th minute of injury time against 10-man Vietnam for a thrilling 3-2 win.

Aymen Hussein scored twice, including the decider at the death from the penalty spot, to take his tally to a tournament-leading five goals.

Vietnam led three minutes before the break when Bui Hoang Viet Anh poked home off a Khuat Van Khang free-kick.

That would be Khuat's last major attacking involvement -- he was sent off in first-half stoppage time for a second yellow card.

Rebin Sulaka equalised immediately after the restart and then Hussein, on as a substitute, made it 2-1.

Hussein missed a penalty and it looked like he would be made to regret it when Nguyen Quang Hai got behind the Iraqi back line to score on the stroke of the 90th minute to make it 2-2.

But Vietnam gave away another penalty deep in added time and on this occasion Hussein did not miss.

"He was brave to take the second penalty," said Iraq coach Jesus Casas.