This paper deals with necessary conditions satisfied by the optimal control of a variational inequality governed by a semilinear operator of elliptic type and a maximal monotone operator b in ÓÊx Ó. A non classical smoothing of b allows us to formulate a perturbed problem for which the original control is an e-solution. By considering the spike perturbations and applying Ekeland's principle we are able to state approximate optimality conditions in Pontryagin's form. Then passing to the limit we obtain some optimality conditions for the original problem extending those obtained for semilinear elliptic systems and for variational inequalities.