<p style='text-indent:20px;'>We study an optimal control problem affine in two-dimensional bounded control, in which there is a singular point of the second order. In the neighborhood of the singular point we find optimal spiral-like solutions that attain the singular point in finite time, wherein the corresponding optimal controls perform an infinite number of rotations along the circle <inline-formula><tex-math id="M1">\begin{document}$ S^{1} $\end{document}</tex-math></inline-formula>. The problem is related to the control of an inverted spherical pendulum in the neighborhood of the upper unstable equilibrium.</p>