Manchester City lost for the first time in 29 matches as Ukrainian side Shakhtar Donetsk won to join City in the last 16 of the Champions League.
A much-changed City, who had already secured top spot in Group F, fell behind when Brazilian Bernard curled a shot past Ederson from 15 yards.
Shakhtar doubled their lead as Ismaily capitalised on an Ederson error and tapped the ball into an empty net.
Sergio Aguero scored an injury-time penalty after Gabriel Jesus had been fouled by Bohdan Butko, but City could not extend their unbeaten record in 2017-18.
City had been hoping to become the first British club to win all six of their group matches in one Champions League season, but instead suffered their first defeat since Arsenal beat them 2-1 in the FA Cup semi-final on 23 April.
Who can City and Shakhtar face?
For the first time in Champions League history, there will be five English teams in the last 16 after Liverpool thrashed Spartak Moscow to win Group E.
It means City, Liverpool, Manchester United and Tottenham all won their groups, while Chelsea came second in Group C.
The draw for the last 16 takes place at 11:00 GMT on Monday at Uefa’s headquarters in Nyon, Switzerland and teams from the same country, or who played in the same group, cannot face each other.
Despite winning Group F, City could still face a two-legged match against Bundesliga leaders Bayern Munich, Italian champions Juventus or reigning European champions Real Madrid, who beat them in the Champions League semi-finals two seasons ago.
However, the Premier League leaders could also face less daunting ties in the shape of Swiss side Basel, Spanish team Sevilla or Portugal’s Porto, while Manchester United, Liverpool and Tottenham are three of the potential seven sides Shakhtar could be up against.