Four-dimensional gauge theories can flow in the infrared to non-trivial conformal field theories. We first show in a weakly-coupled and ultraviolet-complete 4d model how conformality is lost by annihilation of two nearby fixed points that move into the complex plane, and how a walking dynamics emerges. We then analyze the conformal window of QCD employing Borel resummation techniques both for the ordinary perturbative series and for the Banks-Zaks conformal expansion. We find substantial evidence that QCD with $n_f=12$ flavours flows in the IR to a conformal field theory. Though the evidence is weaker, we find indications that also $n_f=11$ might sit within the conformal window. The conformal window might extend for lower values of $n_f$, but our methods break down for $n_f<11$, where non-perturbative effects become important.