In this paper the authors consider the optimal control problem described by the differential inclusion dot xin F(x,t) under the constraints K^1(p)leq 0, K^2(p)=0, x(t)in G(t) with the cost function k^0(p)tomin, where p=(t_1,t_2,x_1,x_2), x_1=x(t_1), x_2=x(t_2), tin [t_1,t_2], xin {bf R}^n. Under suitable assumptions on the multivalued mappings F, G, the vector functions K^1, K^2 and the scalar function k^0, the authors prove first-order necessary conditions for optimality in the form of the Pontryagin maximum principle. The proof of the main result is based on the method of perturbation, which allows one to remove the state constraints. par The results of this paper include different versions of the maximum principle and, among other things, extend the results of previous works [A. V. Arutyunov and N. T. Tynyansky, Izv. Akad. Nauk SSSR Ser. Mat. {bf 39} (1984), no. 2, 133--134; per bibl.; G. Pappas, J. Optim. Theory Appl. {bf 44} (1984), no.~4, 657--679; [msn] MR0777818 (86d:49029) [/msn]].