<p style='text-indent:20px;'>The present paper studies a new class of problems of optimal control theory with differential inclusions described by fourth order Sturm-Liouville type differential operators (SLDOs). Then, there arises a rather complicated problem with simultaneous determination of the SLDOs with variable coefficients and a Mayer functional depending of high order derivatives of searched functions. The sufficient conditions, containing both the Euler-Lagrange and Hamiltonian type inclusions and "transversality" conditions are derived. Formulation of the transversality conditions at the endpoints <inline-formula><tex-math id="M1">\begin{document}$t = 0$\end{document}</tex-math></inline-formula> and <inline-formula><tex-math id="M2">\begin{document}$t = 1$\end{document}</tex-math></inline-formula> of the considered time interval plays a substantial role in the next investigations without which it is hardly ever possible to get any optimality conditions. The main idea of the proof of optimality conditions of Mayer problem for differential inclusions with fourth order SLDO is the use of locally-adjoint mappings. The method is demonstrated in detail as an example for the semilinear optimal control problem, for which the Weierstrass-Pontryagin maximum principle is obtained.