Brazil head coach Carlo Ancelotti.

Brazil head coach Carlo Ancelotti insisted he always knew his "suffering" side would eventually breach Japan's defence, praising their ultimate patience after securing a place in the FIFA World Cup round of 16 with a last-gasp 2-1 victory at NRG Stadium on Monday night.

Substitute Gabriel Martinelli pounced in the 95th minute of a dramatic encounter to rescue the five-time world champions and send tournament dark horses Japan home in heartbreaking fashion. The Arsenal winger's strike represents the latest winning goal scored in normal time during a World Cup knockout fixture on record, dating back to 1966.

Japan had held a deserved 1-0 lead at the interval following some uncharacteristically sloppy play from the South Americans. However, Brazil completely dominated the second-half landscape, extracting goals from veteran midfielder Casemiro and Martinelli at the death to turn the tie on its head.

"No one is perfect, but you can handle how to get out of mistakes, how to think, and how to look ahead," the acclaimed Italian tactician said, reflecting on his first World Cup campaign as an international manager. "The team did very well in the second half. No one inside our camp thought that this squad wouldn't score."