Pep Guardiola claimed his first victory as Manchester City manager with a 6-5 penalty shoot-out success over Borussia Dortmund, after their International Champions Cup tie ended 1-1 in China.
City looked on course to end their pre-season tour with a narrow victory in Shenzhen after substitute Sergio Aguero rounded off a fine move 11 minutes from time to hand them the lead.
But victory was snatched from their grasp right at the end when Christian Pulisic's 95th-minute equaliser sent the game to penalties.
Both teams missed their opening penalties, but then went on to score their next five until Raheem Sterling and Brunn Larsen were denied in sudden death.
Jose Angel Esmoris Tasende made it match-point to City by scoring their seventh and it was left rookie goalkeeper Angus Gunn to be the hero as he saved from Mikel Merino to hand Guardiola his landmark triumph.
After the cancellation of Monday's Manchester derby in Beijing, City's appeared slow out of the traps against a buoyant Dortmund outfit fresh from their thumping of United last week.
Willy Caballero's misplaced clearance handed Dortmund their first opening on five minutes, but Nicolas Otamendi was alert to block Ousmane Dembele's goal-bound drive.
Dortmund's second chance was all of their own making. Dembele and Sebastian Rode combined to play Marcel Schmelzer in behind the City defence, but his low cross evaded everyone in the area.
City looked menacing on the counter but failed to make the most of their chances, while their sloppiness on the ball continued to put their clean sheet under threat.
City youngster Oluwatosin Adarabioyo presented Dembele with a chance to add to the goal he scored against Manchester United earlier in the tournament with a misplaced pass on 17 minutes, but he missed the target.
Depsite this the best chance of the half fell to City in stoppage time, but Kelechi Iheanacho was thwarted by the onrushing Roman Burki after receiving a threaded ball into the six-yard box.
Both managers turned to their bench at the interval, with Guardiola bringing Aguero, David Silva, Yaya Toure and Wilfried Bony for some much-needed game-time.
While Adarabioyo continued to impress at the back, Bony had two chances to open the scoring, first drawing Burki into an awkward save on 62 minutes before lashing over the bar five minutes later.
Both sides continued to be wasteful in a remarkable three-minute spell that saw Bony fail to play Aguero through on goal before Gonzalo Castro spurned a glorious one-on-one opportunity.
Aguero looked to have sealed victory on 79 minutes, turning Silva's inch-perfect pass into the unguarded Dortmund net, but the Bundelsiga side hit back with the final kick of the game as Pulisic pounced on some slack defender to force a shoot-out.
But the goal just prolonged City's wait as Gunn thwarted Merino in sudden death as City signed out with victory.
Guardiola takes his new team to Gothenburg for a friendly with Arsenal before turning his attention to their Premier League opener away at Sunderland on August 13.