Abstract: In the continuous production of coke or semicoke from coal grains and/or fines an inclined air-tight rotating tubular oven is fed with coal grains and/or fines from a hopper. As the coal grains and/or fines progress down the rotating oven they are heated by a stoichiometric mixture from a burner and converted into coke or semicoke having a volatile content of from 1% to 20%. During the heating of the coal grains and/or fines the interior of the oven is maintained under a slightly elevated pressure in relation to the atmosphere. The coke or semicoke is then extracted from the oven and passed to an extinguishing device where the coke or semicoke is extinguished to prevent recombustion.