Given a domain G, a reflection vector field d(center dot) on partial derivative G, the boundary of G; and drift and dispersion coefficients b(center dot) and sigma(center dot), let L be the usual second-order elliptic operator associated with b(center dot) and sigma(center dot). Under mild assumptions on-the coefficients and reflection vector field, it is shown that when the associated submartingale problem is well posed, a probability measure pi on (G) over bar with pi (partial derivative G) = 0 is a stationary distribution for the corresponding reflected diffusion if and only if integral((G) over bar)Lf(x)pi(dx) <= 0 for every f in a certain class of test functions. The assumptions are verified for a large class of obliquely reflected diffusions in piecewise smooth domains, including those that are not semimartingales. In addition, it is shown that any nonnegative solution to a certain adjoint partial differential equation with boundary conditions is an invariant density for the reflected diffusion. As a corollary, for bounded smooth domains and a class of polyhedral domains that satisfy a skew-symmetry condition, it is shown that if a certain skew-transform of the drift is conservative and of class C-1, and the covariance matrix is nondegenerate, then the corresponding reflected diffusion has an invariant density p of Gibbs form, that is, p(x) = e(H(x)) for some C-2 function H. Finally, under a nondegeneracy condition on the diffusion coefficient, a boundary property is established that implies that the condition pi (partial derivative G) = 0 is necessary for pi to be a stationary distribution. This boundary property is of independent interest.