LOS ANGELES: Brazil advanced to the last 16 of the World Cup on Monday with a thrilling last-gasp 2-1 victory over Japan as the tournament’s knockout rounds got into full swing.

Arsenal striker Gabriel Martinelli was the hero for Brazil in Houston, scoring in the fifth minute of stoppage time to settle an enthralling contest at the NRG Stadium.

Japan had threatened to pull off one of the all-time great World Cup upsets after Kaishu Sano fired them into the lead with a superb 29th-minute goal on the counter-attack.

Brazil looked stunned by the Japanese opener for the remainder of the half and the Asian giants comfortably protected their lead up to half-time.

But Brazil coach Carlo Ancelotti rolled the dice at half-time by bringing on an additional striker in Endrick for midfielder Lucas Paqueta and the South Americans immediately looked more threatening.