Brazil reached the World Cup quarterfinals after Neymar scored one goal and assisted on a second in a 2-0 win over a Mexico side that saw its "fifth game" curse continue.
Neymar opened the scoring for Brazil with a close-range tap-in at 50 minutes and Roberto Firmino made the game safe with two minutes remaining.
It was another painful exit for Mexico, which has failed to play a fifth game at the World Cup since hosting the tournament in 1986. After being disqualified from participating in 1990, Mexico has suffered seven successive defeats in the round of 16 since 1994.
Brazil will now face the winners of Belgium and Japan in the quarterfinals, though Casemiro will be suspended after picking up a yellow card in the second half.
The five-time winners also surpassed Germany's World Cup record of 226 World Cup goals, moving on to 228 after Neymar and Firmino's strikes.
Mexico, unfazed by its poor record in the last-16, began brightly and Brazil's full-backs Fagner and Filipe Luis struggled with their pace in attack. Hirving Lozano went close inside the opening two minutes as his shot was blocked after Alisson failed to deal with a cross from the left.
Focused and fearless, Mexico continued to trouble Brazil in the opening stages, with Fagner in particular struggling massively to cope with the threat down his side.
Second best for 24 minutes, Brazil and Neymar finally stirred to life in attack with the Paris Saint-Germain forward forcing Guillermo Ochoa into a decent stop before Gabriel Jesus' shot was blocked.
Jesus then had another opportunity as a nervous Mexico defense failed to clear, but the Manchester City striker found Ochoa equal to his shot.
Juan Carlos Osorio named Rafa Marquez, 39, as captain to make it five World Cups the veteran defender had skippered his country. He was removed for Miguel Layun at halftime, with Brazil ending the first half on top.
That continued early in the second half, with Philippe Coutinho cutting inside the penalty area only for his fierce strike to be pushed away superbly by Ochoa.
The goalkeeper could do nothing about Brazil's opener five minutes after the restart, as Willian's left-footed cross found Neymar, who was cutting into the 6-yard box and made no mistake from close range.
Paulinho almost doubled the lead before the hour, but his shot inside the box was kept out by the excellent Ochoa, who then had to tip Willian's fizzing drive over the bar.
Mexico never really looked likely to get back into the game, and Brazil made sure two minutes from time. Neymar, who had earlier writhed around in apparent agony after Layun appeared to touch his ankle, burst through and prodded past Ochoa for Firmino to finish the game off -- and Mexico with it.