In this work, an optimal control problem with state constraints of equality type is considered. Novelty of the problem formulation is justified. Under various regularity assumptions imposed on the optimal trajectory, a non-degenerate Pontryagin Maximum Principle is proven. As a consequence of the maximum principle, the Euler–Lagrange and Legendre conditions for a variational problem with equality and inequality state constraints are obtained. As an application, the equation of the geodesic curve for a complex domain is derived. In control theory, the Maximum Principle suggests the global maximum condition, also known as the Weierstrass–Pontryagin maximum condition, due to which the optimal control function, at each instant of time, turns out to be a solution to a global finite-dimensional optimization problem. © 2015, Springer Science+Business Media New York.