Italy 4 Japan 3: Substitute Sebastian Giovinco tapped in a late goal to secure Italy a thrilling win a semi-final berth in the Confederations Cup.
Giovinco slotted home the winner in the 86th minute capping a pulsating contest that saw the Azzurri edge ahead with three consecutive goals after trailing 2-0 before halftime.
Shinji Okazaki nodded a lovely, glancing header past Italy keeper Gianluigi Buffon from a Yasuhito Endo free kick to level at 3-3 in the 69th minute, and Japan tried desperately to respond to Giovinco's late score in a frenetic finish but to no avail.
Italy join Brazil in the semi-finals and might consider themselves lucky after starting poorly and benefiting from an own goal by Japan defender Atsuto Uchida.
Coach Alberto Zaccheroni worried his side might be overawed by the four-times world champions but they began confidently and had their first goal in the 21st minute when Keisuke Honda slotted home a penalty kick after Buffon was adjudged to have brought down Okazaki.
The Blue Samurai doubled their lead in the 33rd minute after the Italian defence missed a high ball and it fell to Manchester United's Shinji Kagawa who swiveled and hammered it home.
Italy pulled one back in the 41st minute when de Rossi rose to powerfully head home a Pirlo corner and almost had an equaliser on the stroke of half-time when Emanuele Giaccherini hit the post after Mario Balotelli had set him up with a deft header.
The Italians' second goal came just five minutes after the restart when Maya Yoshida was caught in possession by Giaccherini and Uchida turned his cross ball into his own net with Balotelli waiting to pounce.
Italy took the lead in controversial circumstances just two minutes later after Makoto Hasebe was harshly punished for a handball in the box and Balotelli made no mistake from the spot.
Okazaki’s header gave Japan renewed hope and they were unlucky not to grab a fourth goal when they hit the post and bar in a matter of seconds. But sloppy defending opened the door for Giovinco to grab the clincher with four minutes left in regular time.