The electric machine comprises a cylindrical rotor with axial first air channels and a stator with axial second air channels. The outer surface of the stator is provided with cooling fins. There is a first air chamber at a first end of the rotor, a second air chamber and an adjacent third air chamber at a second end of the rotor. A first fan circulates internal air from the first axial air channels to the second air channels in a closed air circulation within the electric machine. A second fan blows external cooling air from the outside of the electric machine through the third air chamber and from the outlet opening of the third air chamber along the outer surface of the stator. The number of second air channels in the stator is three.