A filter device has a filter housing (1, 3) releasably accommodating one filter element (15) and has a housing pot (1) surrounding the filter element (15) and a removably attachable housing head (3) with fluid passage (39) for the discharge of filtrate. A valve device in the fluid passage includes a closing body (53) blocking the discharge flow in its closed position and facilitates the discharge flow in its release position. A locking device includes a blocking member (57) locking the closing body (53) in its closed position. The blocking member (57) can move out of its locking position into its unlocking position by a control element (81) on the filter element (15). When the filter element (15) is situated in its functional position in the housing pot (1), the control element impacts the blocking member (57) as the housing head (3) is attached to the housing pot (1) to move the blocking member axially to its unblocking position.