BERLIN – Japan will battle Hungary for a quarterfinal berth at the Women’s Basketball World Cup after wrapping up group play with a 79-59 loss to Spain on Monday.

Japan and Mali both finished with 1-2 records in Group A, but head coach Corey Gaines’ side advanced to the quarterfinal playoff round in third place by virtue of winning their head-to-head matchup.

World No. 10 Japan will meet 19th-ranked Hungary, the runner-up in Group B, in Berlin on Tuesday.

Akatsuki Japan trailed Spain 39-36 at halftime but struggled to match the world No. 6 side on the boards as it pulled away in the second half.

Point guard Kokoro Tanaka scored a team-high 15 points for Japan, while shooting guard Norika Konno added 12 off the bench.