Brazil edged Japan with a stoppage-time winner in the first of two women’s international friendlies in Sao Paulo.
Japan came back from 3-1 down against Brazil with two late goals, only to lose out to a 97th-minute decider.
Teenager Aoba Fujino scored approaching half-time but Beatriz Zaneratto levelled from a free kick before the break.
Gabi Portiho took advantage to score when Saki Kumagai surrendered possession, Zaneratto then putting Brazil 3-1 up just after the hour mark following another error, this time by Moeka Minami.
Jun Endo converted an 86th-minute penalty won by debutant Momoko Tanigaw and Mina Tinaka equalised by volleying home Risa Shimizu’s cross.
However, Priscilla pounced to make it 4-3 at the death, clipping a shot over the keeper into the far corner.
The two teams meet again on Sunday 3 December.