We present measurements of the elliptic (v2), triangular (v3) and quadrangular (v4) anisotropic azimuthal flow over a wide range of pseudorapidities (e549092d8" title="Click to view the MathML source">−3.5<η<5). The measurements are performed with Pb–Pb collisions at using the ALICE detector at the Large Hadron Collider (LHC). The flow harmonics are obtained using two- and four-particle correlations from nine different centrality intervals covering central to peripheral collisions. We find that the shape of vn(η) is largely independent of centrality for the flow harmonics n=2–4, however the higher harmonics fall off more steeply with increasing |η|. We assess the validity of extended longitudinal scaling of v2 by comparing to lower energy measurements, and find that the higher harmonic flow coefficients are proportional to the charged particle densities at larger pseudorapidities. Finally, we compare our measurements to both hydrodynamical and transport models, and find they both have challenges when it comes to describing our data.