The equation of the Bohr–Mottelson Hamiltonian with a sextic oscillator potential is solved for -rigid prolate nuclei. The associated shape phase space is reduced to three variables which are exactly separated. The angular equation has the spherical harmonic functions as solutions, while the equation is converted to the quasi-exactly solvable case of the sextic oscillator potential with a centrifugal barrier. The energies and the corresponding wave functions are given in closed form and depend, up to a scaling factor, on a single parameter. The and states are exactly determined, having an important role in the assignment of some ambiguous states for the experimental bands. Due to the special properties of the sextic potential, the model can simulate, by varying the free parameter, a shape phase transition from a harmonic to an anharmonic prolate -soft rotor crossing through a critical point. Numerical applications are performed for 39 nuclei: Ru, Mo, Xe, Ce, Nd, Sm, Gd, Dy, 172Os, Pt, 190Hg and 222Ra. The best candidates for the critical point are found to be 104Ru and Xe, followed closely by 128Xe, 172Os, 196Pt and 148Nd.