In a Gaussian, heterogeneous, cross-sectionally independent panel with incidental intercepts, Moon, Perron, and Phillips (2007, Journal of Econometrics 141, 416–459) present an asymptotic power envelope yielding an upper bound to the local asymptotic power of unit root tests. In case of homogeneous alternatives this envelope is known to be sharp, but this paper shows that it is not attainable for heterogeneous alternatives. Using limit experiment theory we derive a sharp power envelope. We also demonstrate that, among others, one of the likelihood ratio based tests in Moon et al. (2007, Journal of Econometrics 141, 416–459), a pooled generalized least squares (GLS) based test using the Breitung and Meyer (1994, Applied Economics 25, 353–361) device, and a new test based on the asymptotic structure of the model are all asymptotically UMP (Uniformly Most Powerful). Thus, perhaps somewhat surprisingly, pooled regression-based tests may yield optimal tests in case of heterogeneous alternatives. Although finite-sample powers are comparable, the new test is easy to implement and has superior size properties.