NOVELTY - Thermal treatment of biomass comprises feeding biomass (6) to reactor (16); heating biomass under conditions with low oxygen concentration to cause at least partial torrefaction of organic material present in biomass; passing gaseous reaction products (10) generated by thermal treatment from reactor to combustion process (13); passing hot flue gases (11) from combustion process to reactor to carry out thermal treatment; and performing combustion process in heating boiler (14).    USE - Method for thermal treatment of biomass (claimed) used for producing fuels.    ADVANTAGE - The process improves fuel-properties of biomass in integrated manner, thus facilitating storage, shipping and use of biomass. The process is more readily controllable, and the amount of energy leaving the biomass in gaseous form is lower. Higher energy density is attained by compacting thermally treated biomass, thus converting it into more competitive fuel having lower shipping costs. Also the hydrophobic properties of thermally treated biomass are improved by compacting, thus improving storage stability.    DETAILED DESCRIPTION - Thermal treatment of biomass comprises:    (A) feeding biomass (6) to reactor (16);    (B) heating biomass at 180-350 degrees C under conditions with low oxygen concentration to cause at least partial torrefaction of organic material present in biomass to give components inert with respect to biological decomposition processes;    (C) passing gaseous reaction products (10) generated by thermal treatment from reactor to combustion process (13);    (D) passing hot flue gases (11) from combustion process to reactor to carry out thermal treatment; and    (E) performing combustion process in heating boiler (14), where additional fuel (15) is also burned in such amounts that not greater than 20%, preferably not greater than 10 % of energy content of fuel originates from gaseous reaction products generated in reactor.    The thermal treatment results in gaseous reaction products and thermally treated biomass (8).    DESCRIPTION OF DRAWING(S) - The drawing shows a schematic diagram of thermal treatment of biomass as continuous co-current process.    Biomass (6)    Thermally treated biomass (8)    Gaseous reaction products (10)    Hot flue gases (11)    Combustion process (13)    Heating boiler (14)    Fuel (15)    Reactor (16)