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.
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.
Source: BBC Sports