Introduction.-In the derivation of necessary conditions for various optimization problems one should distinguish two basic elements: the first element is common to all problems and deals with optimization. in itself, whereas the second element is an exercise in ordinary differential equations, difference equations, or partial differential equations, according to the particular nature of the problem under consideration. The present paper is a contribution to the first of these elements: we give a very general maximum principle for a mathematical programing problem over an arbitrary set. Although nonlinear optimal control problems have been our original motivation, we shall show, by an example, that the results of this paper include the standard Kuhn-Tucker necessary conditions and generalize them from finite-dimensional spaces to arbitrary linear spaces. AI oreover, this paper includes and extends all the important necessary conditions in optimal control (with or without restricted phase coordinates).