A curtain-gas filter for a mass- or mobility-spectrometer that bars gases or vapors of a high-flux atmospheric pressure ion source, as we ions of high mobility and charged droplets, from entering an evacuated mass spectrometer or a mobility spectrometer that is at a lower pressure than the main filter volume of the curtain-gas filter. A portion of the ion-source buffer gas in the ion-source plume is sucked through an ion-source buffer gas inlet into the main filter volume of the curtain-gas filter, from where this ion-source gas is exhausted after a properly shaped electric field has pushed a large portion of the embedded ions into an externally provided stream of a clean buffer gas, which is sucked through a passage into a mass- or mobility-spectrometer that is at a lower pressure.