Sinsheim - A late David Silva goal gave Manchester City a 2-1 victory at Hoffenheim on Tuesday as Pep Guardiola's side got their Champions League campaign back on track in Germany.
After suffering a shock 2-1 defeat at home to Lyon a fortnight ago, the Premier League champions badly needed the three points to move off the bottom of Group F.
Silva poached the winner with just three minutes left when he reacted quickest to nick the ball off Hoffenheim defender Stefan Posch on the penalty spot and fire home.
Hoffenheim had taken the lead in the first minute through Ishak Belfodil, but Sergio Aguero quickly equalised before Silva's late strike.
"We've got to take all the positives out of this performance with the way we attacked and defended with a high line," City captain Vincent Kompany told BT Sport.
"It's a fantastic result, every away game in the Champions League is so hard to get three points from.
"It was the only way to put right the result against Lyon."
The away win was thoroughly deserved as City were finally rewarded for their patience after dominating a determined Hoffenheim defence for long spells.
However, City got off to a disastrous start at the Rhein-Neckar Arena as Hoffenheim shocked the English side by taking the lead after just 44 seconds.
When central midfielder Kerem Demirbay spotted a hole in the City defence, his pass put Belfodil clear to fire past goalkeeper Ederson to the delight of the home fans.
City hit back in the eighth minute when Silva's pass split the Hoffenheim defence and found Leroy Sane who cut the ball back for Aguero to convert.
From that point on, City were repeatedly thwarted in their efforts to grab a second goal against a dogged Hoffenheim side until Silva struck.
The Germans had a huge let-off on 14 minutes when Raheem Sterling held off his marker and dribbled across goal, but his final shot went wide.
City threatened again on 32 minutes when Sane managed to get the ball away to Aguero again, but he could only fire over.
The Argentinian had a total of seven chances, five in the first half alone, and moments later Hoffenheim goalkeeper Oliver Baumann had to palm yet another Aguero shot over the crossbar.
Somehow, it remained 1-1 at the break as repeated City chances went begging.
Hoffenheim started the second half just as they had the first -- at full throttle.
Belfodil again found space in the City defence, but fired wide as did midfielder Florian Grillitsch moments later in an explosive opening from the hosts.
City lived dangerously in chasing the elusive second goal.
Ederson was caught way out of his goal by a Hoffenheim counter-attack, but the hosts failed to take advantage of the empty net.
City's growing frustrations bubbled over when Kyle Walker was booked for a crunching tackle on Hoffenheim's Pavel Kaderabek.
With 20 minutes to go, Aguero had his head in his hands after wasting a golden chance by heading straight at Hoffenheim 'keeper Baumann.
Guardiola, back on the sidelines after serving a one-match ban against Lyon, leapt off the bench in fury when City were denied a penalty after Baumann brought down Sane in full flight in the area.
However, Silva popped up with the winner to delight City's travelling fans.