  Aims: We investigate the effect of including a proper energy balance on the
interaction of a low-mass planet with a protoplanetary disk. Methods: We use a
three-dimensional version of the RODEO method to perform hydrodynamical
simulations including the energy equation. Radiation is included in the
flux-limited diffusion approach. Results: The sign of the torque depends
sensitively on the ability of the disk to radiate away the energy generated in
the immediate surroundings of the planet. In the case of high opacity,
corresponding to the dense inner regions of protoplanetary disks, migration is
directed \emph{outward}, instead of the usual inward migration that was found
in locally isothermal disks. For low values of the opacity we recover inward
migration, and we show that torques originating in the coorbital region are
responsible for the change in migration direction.
