Method for recovering liquid and gaseous hydrocarbons from comminuted raw solid fossil materials containing hydrocarbons such as oil shale and coal by adding oil to the raw material at a temperature of 610 K to 690 K and a pressure of 20 to 100 bar for a sufficient length of time to effect conversion of hydrocarbons in the raw material to gases and normally liquid hydrocarbons and a solid residue, and separating the normally liquid hydrocarbons from the solid residue by solvent extraction with a volatile liquid solvent, the improvement comprising introducing said added oil in a vaporous state into a heated reaction vessel, introducing said raw material into the heated reaction vessel at a temperature below the condensation temperature of the oil to cause said oil vapor to condense at the surface of said raw material, passing the raw material through the reaction vessel and heating said reaction vessel to cause said raw material leaving said reaction vessel to be at a temperature above the condensation temperature of said oil at the pressure prevailing in the reaction vessel.