  A three-component Stackel model of the Galaxy, including the bulge, disk, and
halo, is constructed. Parameter estimates of the potential are obtained as a
result of fitting the model rotation curve to azimuthal velocities found from
data on trigonometric parallaxes and spatial velocities of masers. The fitting
method takes into account the measurement and natural dispersions of azimuthal
velocities and uses an algorithm for excluding objects with excessive
residuals. In order to obtain more uniform samples, the objects were divided
into two groups: masers associated with high-mass star forming regions and
masers of other types. A significant kinematic inhomogeneity of these groups
was identified and taken into account: the azimuthal velocity dispersion is
$\sigma_{0,1}=4.3\pm 0.4$~km\,s$^{-1}$, in the first group and
$\sigma_{0,2}=15.2\pm1.3$~km\,s$^{-1}$ in the second. After constructing the
model of the Galactic-plane potential, it was generalized to the entire space
under the assumption of the existence of a third quadratic integral of motion.
When reconstructing the Galactic rotation curve in detail, the used algorithm
gives an analytical expression for the Stackel potential, which significantly
simplifies the task of constructing the Galaxy's phase density model in the
Stackel approximation. In order to make the Stackel model more realistic, one
needs to develop methods of direct account of data on the vertical distribution
of density in the Galaxy.
