Brazil had too much firepower for Italy as they secured a thrilling 4-2 win to finish top of Group A in the Confederations Cup on Saturday night.
The tournament hosts enjoyed a chance just two minutes in when Oscar was stopped by a last ditch tackle before Fred found a way through and worked Gianluigi Buffon with a powerful low strike.
Italy responded in the 16th minute but Mario Balotelli scuffed his shot after Claudio Marchisio had done well to snatch possession and find the AC Milan forward.
Neymar then dragged a shot just two yards wide of the target after being found by Oscar but there would be a breakthrough before the break as substitute Dante was lurking to tuck away the rebound following Buffon's superb effort to keep out Fred's header.
The second-half started brightly with Oscar poking a shot straight at the goalkeeper before Italy equalised in the 51st minute when Emanuele Giaccherini surged into the area and smashed a low shot into the bottom corner.
They had hardly finished celebrating when Neymar would produce the goods once again after he won a free-kick at the edge of the area as he whipped a sensational strike past Buffon.
Balotelli almost produced an equally spectacular free-kick at the other end but Brazil would stretch their advantage just after the hour mark as Fred showed strength and skill to shake off a defender before lashing his shot past Buffon.
A controversial moment arrived in the 71st minute when the referee appeared to blow the whistle following what seemed to be a foul on Balotelli in the area but decided not to stick with his original decision after Giorgio Chiellini slotted the ball home just seconds later.
The final stages were tense as Italy went close through Christian Maggio who hit the crossbar with a header but Fred would wrap up the result when he tucked away the rebound after Marcelo saw his low shot saved.
The result means that Brazil are likely to avoid meeting Spain in the semi-finals, unless Nigeria are able to pull off an upset.