Pep Guardiola felt his Manchester City team had come through a stern test as they secured top spot in their Champions League group on Wednesday.

The Premier League champions assured themselves of a favourable seeding in Monday’s draw for the last 16 as they came from behind to beat Hoffenheim 2-1 with two Leroy Sane goals at the Etihad Stadium.

City were stretched early on by the Bundesliga side – as they were before claiming a narrow win in Germany on October – while they also took only one point from two games against Lyon in Group F.

Guardiola said: “We finished group stage in the best way. We’re in the best 16 teams in Europe.

“It’s a big compliment to everyone involved in the group because it was tough. It’s more difficult in the Champions League because the opponents are so much better. If you sleep a little bit you are in Europa League.

“That’s why I say again it is incredible when you get into the last 16 because it is so demanding.”

Hoffenheim took a 16th-minute lead with a penalty from former Leicester striker Andrej Kramaric, who also forced Ederson to make a fine save.

City responded by hitting the woodwork through Gabriel Jesus and Nicolas Otamendi before Sane equalised with a superb free-kick on the stroke of half-time. Sane secured victory with his second on the hour and City, with 18-year-old Phil Foden impressing, could have scored several more as they dominated the second half.

Guardiola said: “Before they scored we were flat, they were better, but after the penalty we were normal and created a lot of chances. The second half the team was much better.”

Sane’s goals were his first in the Champions League.

The German said: “I’m really happy about the two goals but I’m much more happy that we won. We are now first in the table.”

The 22-year-old claimed, however, he was fortunate with his free-kick.

“I just tried it and I was lucky today,” he said.