This invention is directed to a process for treating biomass. The biomass is treated with a biomass swelling agent within the vessel to swell or rupture at least a portion of the biomass. A portion of the swelling agent is removed from a first end of the vessel following the treatment. Then steam is introduced into a second end of the vessel different from the first end to further remove swelling agent from the vessel in such a manner that the swelling agent exits the vessel at a relatively low water content.