The goal of this paper is to prove the first and second orderoptimality conditions for some control problems governed bysemilinear elliptic equations with pointwise control constraintsand finitely many equality and inequality pointwise stateconstraints. To carry out the analysis we formulate a regularityassumption which is equivalent to the first order optimalityconditions. Though the presence of pointwise state constraintsleads to a discontinuous adjoint state, we prove that the optimalcontrol is Lipschitz in the whole domain. Necessary and sufficientsecond order conditions are proved with a minimal gap betweenthem.