In the last two decades, there has been an increasing interest in nonsmooth optimization, both from a theoretical viewpoint and because of several applications. Necessary optimality conditions, as well as other important topics, have received new attention (see, for instance, Refs. 1–11 and references therein). In recent papers (see, for instance, Refs. 12–18 and references therein), theorems of the alternative for generalized systems have been studied and their use in optimization has been exploited. As a consequence of this analysis, the concept of image of a constrained extremum problem has been developed; such a concept, whose introduction goes back to the work of Caratheodory, has only recently been recognized to be a powerful tool (Refs. 8, 10, 13, 14, 18–21). On the basis of these ideas, in the present paper we deal with a necessary condition for constrained extremum problems having a finite-dimensional image, while those having an infinite-dimensional one will be treated in a subsequent paper. The necessary condition is established within a class of semidifferentiable functions, which is introduced here and which embraces several classic types of functions (e.g., convex functions, differentiable functions, and even some discontinuous functions). The condition embodies the classic theorems of Lagrange, John, Karush, Kuhn-Tucker, and Euler.