  We introduce and study the basic properties of two ergodic stochastic control
problems associated with the quasistationary distribution (QSD) of a diffusion
process $X$ relative to a bounded domain. The two problems are in some sense
dual, with one defined in terms of the generator associated with $X$ and the
other in terms of its adjoint. Besides proving wellposedness of the associated
Hamilton-Jacobi-Bellman equations, we describe how they can be used to
characterize important properties of the QSD. Of particular note is that the
QSD itself can be identified, up to normalization, in terms of the cost
potential of the control problem associated with the adjoint.
