Let (X, α) be a Kähler manifold of dimension n, and let [ω] ∈ H 1,1 (X, R). We study the problem of specifying the Lagrangian phase of ω with respect to α, which is described by the nonlinear elliptic equationwhere λi are the eigenvalues of ω with respect to α. When h(x) is a topological constant, this equation corresponds to the deformed Hermitian-Yang-Mills (dHYM) equation, and is related by Mirror Symmetry to the existence of special Lagrangian submanifolds of the mirror. We introduce a notion of subsolution for this equation, and prove a priori C 2,β estimates when |h| > (n − 2) π 2 and a subsolution exists. Using the method of continuity we show that the dHYM equation admits a smooth solution in the supercritical phase case, whenever a subsolution exists. Finally, we discover some stability-type cohomological obstructions to the existence of solutions to the dHYM equation and we conjecture that when these obstructions vanish the dHYM equation admits a solution. We confirm this conjecture for complex surfaces.