Brazil produced an unconvincing display at Estadio Castelao as Mexico held them to a goalless draw with an outstanding performance by goalkeeper Guillermo Ochoa.
Luiz Felipe Scolari’s side were again well short of their best in a cauldron of an atmosphere at Estadio Castelao, in Fortaleza.
Neymar and captain Thiago Silva had the best of Brazil’s chances but were denied by Ochoa.
Mexico more than held their own, testing home keeper Julio Cesar through substitute Raul Jiminez and peppering his goal in a breathless second half.
The result leaves both sides with a chance of topping Group A. Brazil face Cameroon in Brasilia in their final match, knowing a point will be enough to see them through.
This was a game in which the hosts’ reliance on the brilliance of Neymar and Oscar was exposed. Fred failed to appease his critics with a toothless display in attack, while Paulinho and Luiz Gustavo lacked imagination in midfield.
It is not the first time Brazil have struggled against Mexico – no team has beaten them more often in the 21st century – and they were fortunate not to lose again.
Neymar was in the thick of the action from the off, dancing away from Mexico defenders, and drawing several fouls.
And it was the Barcelona striker who had the best of the early chances. From Dani Alves’ cross he rose high at the back post to head powerfully towards goal. Ochoa threw himself to his right to tip the ball to safety.
In Brazil the save was compared to Gordon Banks’ famous dive to keep out Pele’s header in the 1970 World Cup.
Ochoa made another vital save with half-time approaching, spreading himself to smother a close-range stab by Paulinho, after Silva chested on a free-kick.
But Mexico gave every bit as good as they got.
Oribe Peralta led wave after wave of Mexico attacks, but it was Hector Herrera and Jose Juan Vazquez who went closest before the interval with piercing shots from distance, one of which Cesar tipped over, while the other whistled just wide.
Though Brazil remained short of their fluent best, the introduction of Bernard for Ramires at half-time added zip to their attack.
Neymar curled a free-kick wide and went closer still as he chested down Bernard’s cross and drilled a fierce low shot at goal, only for Ochoa to deny him once more.
Former Manchester City striker Jo, on as a substitute, dragged a shot wide as Brazil became increasingly desperate for a goal.
Andres Guardado fizzed a shot just over Cesar’s crossbar, while the Brazil goalkeeper had to react quickly to turn away a thunderous low shot from substitute Jiminez. Mexico finished the game with purpose and belief. Brazil must do better.