A method for controlling an engine having an intake manifold and an exhaust manifold, where an exhaust gas recirculation path with a valve is provided between said intake and exhaust manifold, and the engine has a turbocharger; the method comprising during at least one decreased engine output condition, increasing opening of the exhaust gas recirculation valve and adjusting exhaust expansion through a turbine of the turbocharger to decrease expansion through the turbocharger and thereby reduce a likelihood of turbocharger surge.