Two goals apiece from Neymar and Alexandre Pato ensured a 4-2 win for Brazil against Ecuador to set up a re-match against Paraguay in the Copa America quarter-finals.
The game started well with both sides looking to attack and Ecuador held their own in the early exchanges against the favourites.
Real Madrid target Neymar had the first chance of the game, picking the ball up and shooting from 25 yards out, only for his effort to be tipped over the top by Marcelo Elizaga.
Brazil started to dominate possession and took the lead on 28 minutes with a well worked goal. Fenerbahce left-back Andre Santos curled the ball into the box, with Pato attacking at the near post and heading past a stationary Elizaga.
Brazil almost doubled their advantage on 36 minutes, as Maicon galloped down the right, cutting the ball back to Robinho, who shot from the edge of the box and saw his effort clip the left hand post.
However, from the resulting goal kick and against the run of play, Ecuador equalised. A long ball forward found Christian Benitez, who drew two men before feeding Felipe Caicedo at the edge of the box. The Levante attacker's effort had power but was straight at Julio Cesar, who fumbled the effort, letting it trickle into the Brazilian net.
The underdogs finished the half on a high note and a Michael Arroyo effort stretched Inter keeper Cesar, who made amends for his earlier error with a good right handed stop, and the game went into the break all square.
Mano Menezes' team took the lead once more after 48 minutes, with Neymar getting his first goal of the tournament, firing home after being played through by playmaker Ganso.
However, Ecuador refused to lie down, and another Caicedo strike from the edge of the penalty box made it 2-2 on 58 minutes, with Cesar's goalkeeping again under scrutiny as he was beaten at his near post.
Parity only lasted two minutes though, as Pato grabbed his brace after Eligaza spilled a ferocious Neymar shot into his path, and the Milan forward got to the rebound just ahead of Robinho.
The game ended as a contest on 71 minutes as great work by Maicon and Robinho down the right flank allowed the Inter full-back to centre from the byline for Neymar to convert the fourth from six yards.
It could have been five in the dying seconds as Robinho slotted home, only for the goal to be chalked off.
Brazil now take on Paraguay on Sunday in the quarter-finals, while Ecuador exit the tournament.