David Silva scored late for Manchester City to end their four-game losing streak in the Champions League with a 2-1 win at Hoffenheim on Tuesday.
The Spanish forward struck from a narrow-angle with three minutes remaining after pouncing on a loose ball ahead of 21-year-old defender Stefan Posch.
City bounced back from their opening 2-1 home loss to Lyon in the competition despite falling behind inside the first minute, when Ishak Belfodil shot past Brazilian goalkeeper Ederson after Kerem Demirbay played the ball through the visitors' defense.
Sergio Aguero equalized minutes later with a simple finish after Germany winger Leroy Sane capped a good team move to set the Argentine up.
City had Pep Guardiola back on the sidelines after the Spanish coach served his one-match ban for improper conduct, and his side dominated much of the match after recovering from the early deficit.
"It's a good three points as we fought against a lot of things so we're satisfied," Guardiola said.
Sane, Aguero and Raheem Sterling tormented the Hoffenheim defense for much of the first half, when Oliver Baumann rescued his side with some impressive saves.
City defender Kyle Walker was fortunate to escape with just a yellow card for a bad challenge on Pavel Kaderabek in the second half, while the visitors thought they should have had a penalty when Baumann appeared to bring down Sane after missing the ball. Referee Damir Skomina did not award the spot kick.
Hoffenheim had to contend with a host of injuries for its first game at home in Europe's Premier Competition. The side finished fourth in the Bundesliga last season.
"I'm very proud given the situation we're in," Hoffenheim's 31-year-old coach Julian Nagelsmann said. "It's bitter to concede so late. One small mistake was ruthlessly punished. The guys did brilliantly, though."
Later in Group F, Lyon were hosting Shakhtar Donetsk.