The nucleolus of a TU game is a solution concept whose main attraction is that it always resides in any nonempty epsilon-core. In this paper we generalize the nucleolus to an arbitrary pair (PI, F), where PI is a topological space and F is a finite set of real continuous functions whose domain is PI. For such pairs we also introduce the "least core" concept. We then characterize the nucleolus for classes of such pairs by means of a set of axioms, one of which requires that it resides in the least core. It turns out that different classes require different axiomatic characterizations. One of the classes consists of TU-games in which several coalitions may be nonpermissible and, moreover, the space of imputations is required to be a certain "generalized" core. We call these games truncated games. For the class of truncated games, one of the axioms is a new kind of reduced game property, in which consistency is achieved even if some coalitions leave the game, being promised the nucleolus payoffs. Finally, we extend Kohlberg's characterization of the nucleolus to the class of truncated games.