Real dominated the majority of the game but twice fell behind, while City scored two goals against the run of play, before losing the game after some shambolic defending late on.