Pep Guardiola said he is leaving Manchester City at the end of the season, ending a trophy-laden spell in which he established the club as a power while changing the face the English soccer.