We present a new result allowing us to construct Anosov flows in dimension 3 by gluing building blocks. By a building block, we mean a compact 3-manifold with boundary P , equipped with a C 1 vector field X , such that the maximal invariant set t ∈R X t (P ) is a saddle hyperbolic set, and such that ∂P is quasi-transverse to X , i.e., transverse except for a finite number of periodic orbits contained in ∂P . Our gluing theorem is a generalization of a recent result of F. Béguin, C. Bonatti, and B. Yu who only considered the case where ∂P is transverse to X . The quasi-transverse setting is much more natural. Indeed, our result can be seen as a counterpart of a theorem by Barbot and Fenley which roughly states that every 3-dimensional Anosov flow admits a canonical decomposition into building blocks (with quasi-transverse boundary). We will also present a number of applications of our theorem.