Internal combustion engine for a vehicle, comprising at least two cylinders, a moveably arranged piston being arranged in each cylinder in order to increase and decrease, respectively, a volume defined jointly by the cylinder and the piston, and a compressed-air tank (14) connected to at least one of said at least two cylinders, characterized in that said at least two cylinders comprises at least one working cylinder (2) and at least one compressor cylinder (3), the working cylinder (2) comprising a first inlet opening and a first inlet valve (6) arranged to open and close said first inlet opening, a first pneumatic inlet valve actuator (8) operating the first inlet valve (6), an outlet opening and an outlet valve (7) arranged to open and close said outlet opening, a pneumatic outlet valve actuator (9) operating said outlet valve (7), and a working piston (4) moveably arranged in the working cylinder (2), the compressor cylinder (3) comprising a first inlet opening and a first inlet valve (10) arranged to open and close said first inlet opening, an outlet opening and an outlet valve (11) arranged to open and close said outlet opening, and a compressor piston (5) moveably arranged in the compressor cylinder (3) and operatively connected to and operated by the working piston (4), the compressed-air tank (14) is connected to the outlet opening of the compressor cylinder (3) via a first compressed-air conduit (15), the internal combustion engine (1) also comprising a second compressed-air conduit (16) that extends from said first compressed-air conduit (15) and that comprise a first flow valve (17) arranged to open and close the fluid communication from said first compressed-air conduit (15) to said second compressed-air conduit (16), the first inlet valve actuator (8) and the outlet valve actuator (9) of the working cylinder (2) being connected to the second compressed-air conduit (16).