We study the problem of minimizing the Dirichlet integral among all functions u ∈ H 1 (Ω) whose level sets {u = l i } have prescribed Lebesgue measure α i . This problem was introduced in connection with a model for the interface between immiscible fluids. The existence of minimizers is proved with an arbitrary number of level-set constraints, and their regularity is investigated. Our technique consists in enlarging the class of admissible functions to the whole space H 1 (Ω), penalizing those functions whose level sets have measures far from those required; in fact, we study the minimizers of a family of penalized functionals F λ , λ > 0, showing that they are Hölder continuous, and then we prove that such functions minimize the original functional also, provided the penalization parameter λ is large enough. In the case where only two levels are involved, we prove Lipschitz continuity of the minimizers.