The Iraqi army, composed mostly of Shia elements, fought a door to door battle against the Isis in Mosul. They took the city, but in the end it is ISIS that came out victorious if you look at the end game.
The Isis has diluted itself among the populace or