In this paper we study the regularity of the free boundary for a vector-valued Bernoulli problem, with no sign assumptions on the boundary data. More precisely, given an open, smooth set of finite measure D ⊂ R d , Λ > 0 andWe prove that, for any optimal vector U = (u 1 , . . . , u k ), the free boundary ∂(∪ k i=1 {u i = 0}) ∩ D is made of a regular part, which is relatively open and locally the graph of a C ∞ function, a (one-phase) singular part, of Hausdorff dimension at most d − d * , for a d * ∈ {5, 6, 7}, and by a set of branching (two-phase) points, which is relatively closed and of finite H d−1 measure. Our arguments are based on the NTA structure of the regular part of the free boundary.