A diesel engine includes a fuel injection device (9), an external EGR device (19), an internal EGR device (29), and a control device (26) for controlling the fuel injection device (9), external EGR device (19), and internal EGR device (29), wherein the control device (26) implements in a prescribed operation region a premixed combustion in which the fuel is injected before the vicinity of the top dead center and the EGR of a comparatively large quantity is implemented, and implements outside the prescribed operation region a normal combustion in which the fuel is injected in the vicinity of the top dead center and the EGR of a small quantity is implemented. The control device (26) controls the EGR ratio by using both the external EGR device (19) and the internal EGR device (29) when the premixed combustion is implemented and controls the EGR ratio by using only the external EGR device (19) when the normal combustion is implemented.