Copa América - Brazil beat Ecuador to top group
Pato gave Brazil the lead with a 28th-minute header before Felipe Caicedo profited from a Julio Cesar blunder to draw level before half-time.
Neymar completed a beautiful Brazil move to make it 2-1 shortly after the break before Caicedo equalised once again.
But Pato tapped in to ensure Ecuador were level for only a matter of minutes before the superb Neymar put the shine on a deserved win for Brazil.
Brazil, who were coasting for much of the first half, eventually took the lead when Andre Santos floated in a pinpoint cross from the left towards Pato, who sent a bullet header beyond the stranded Marcelo Elizaga.
It seemed a matter of when, not if, Brazil would add a second and, a few minutes before the break, Robinho came agonisingly close to doubling their lead.
Maicon’s marauding run down the right wing had Ecuador stretched and, when the Internazionale full-back cut the ball back to Robinho, his first-time shot appeared to be curling in - only for it to come back off the post.
It was to be a turning point as, moments later, Ecuador counter-attacked through Caicedo, whose routine low shot from the edge of the box somehow squirmed under Julio Cesar’s body to give Ecuador an undeserved equaliser.
Brazil, inspired by Ganso in midfield, came out strongly in the second half and had to wait only three minutes before Neymar had restored their lead.
Chelsea midfielder Ramires found Ganso in space on the edge of the box before the sought-after Santos midfielder rolled an exquisite pass into the feet of Neymar, who collected the ball and fired an emphatic effort past Elizaga.
Brazil barely had time to revel in re-establishing the lead before lightning struck twice in Cordoba.
With Brazil stretched at the back, Caicedo evaded the challenge of Thiago Silva before firing a fearsome low drive past Julio Cesar who, this time, could not be blamed for the goal.
It was a dramatic second equaliser by Caicedo, which seemed to leave Brazil shell-shocked given their dominance throughout.
But Brazil fought fire with fire and responded just two minutes later, taking advantage of some questionable Ecuador defending to take the lead for a third time.
Neymar, whose movement, power and intelligence were a joy to behold, drilled a low effort towards goal from 20 yards that Elizaga was unable to handle, allowing Pato to slide in to poach Brazil’s third from inside the six-yard area.
Ecuador were deflated by Brazil’s quick response, seemingly aware that a third goal might be beyond them. Brazil reacted by continually pushing for a fourth goal to seal the win. Eventually, they got it.
Maicon, picked ahead of Barcelona’s Dani Alves, justified the faith of his manager with a storming run down the right before picking out Neymar, who completed his diagonal run with a classy finish into the corner to give Brazil an 4-2 lead.
The result means Brazil finish top of Group B and will face Paraguay in Sunday’s quarter-final.