Hot filling of liquids, preferably fruit juices, with a pasteurizer (12) having a first heat exchanger, a filling station (15) for filling liquids in a container (25), which includes bottles, and a cooling tunnel (20), which has several cooling cells, for cooling the filled container, using a cooling liquid, which includes water, comprises heating the liquid in the pasteurizer before filling to the container at the filling station, using a thermal energy, and supplying the heated cooling liquid to the pasteurizer using a separate heat pump (30), during the cooling at the cooling tunnel. An independent claim is also included for a device for carrying out the above method.