We investigate the quantifier alternation hierarchy in firstorder logic on finite words. Levels in this hierarchy are defined by counting the number of quantifier alternations in formulas. We prove that one can decide membership of a regular language to the levels BΣ2 (boolean combination of formulas having only 1 alternation) and Σ3 (formulas having only 2 alternations beginning with an existential block). Our proof works by considering a deeper problem, called separation, which, once solved for lower levels, allows us to solve membership for higher levels.The connection between logic and automata theory is well known and has a fruitful history in computer science. It was first observed when Büchi, Elgot and Trakhtenbrot proved independently that the regular languages are exactly those that can be defined using a monadic second-order logic (MSO) formula. Since then, many efforts have been made to investigate and understand the expressive power of relevant fragments of MSO. In this field, the yardstick result is often to prove decidable characterizations, i.e., to design an algorithm which, given as input a regular language, decides whether it can be defined in the fragment under investigation. More than the algorithm itself, the main motivation is the insight given by its proof. Indeed, in order to prove a decidable characterization, one has to consider and understand all properties that can be expressed in the fragment.The most prominent fragment of MSO is first-order logic (FO) equipped with a predicate "<" for the linear-order. The expressive power of FO is now well-understood over words and a decidable characterization has been obtained. The result, Schützenberger's Theorem [20,10], states that a regular language is definable in FO if and only if its syntactic monoid is aperiodic. The syntactic monoid is a finite algebraic structure that can effectively be computed from any representation of the language. Moreover, aperiodicity can be rephrased as an equation that needs to be satisfied by all elements of the monoid. Therefore, Schützenberger's Theorem can indeed be used to decide definability in FO.In this paper, we investigate an important hierarchy inside FO, obtained by classifying formulas according to the number of quantifier alternations in their prenex normal form. More precisely, an FO formula is Σ i if its prenex normal form has at most (i − 1) quantifier alternations and starts with a block of existential quantifiers. The hierarchy also involves the classes BΣ i of boolean combinations of Σ i formulas, and the classes ∆ i of languages that can be defined ⋆ Supported by ANR 2010 BLAN 0202 01 FREC Our solution works as follows: given two regular languages, one can easily construct a monoid morphism α : A * → M that recognizes both of them. We then design an algorithm that computes, inside the monoid M , enough Σ 2 -related information to answer the Σ 2 -separation question for any pair of languages that are recognized by α. It turns out that it is also possible (though much more difficult) to use thi...