Correlations in azimuthal angle extending over a long range in pseudorapidity between particles, usually called the “ridge” phenomenon, were discovered in heavy-ion collisions, and later found in pp and p–Pb collisions. In large systems, they are thought to arise from the expansion (collective flow) of the produced particles. Extending these measurements over a wider range in pseudorapidity and final-state particle multiplicity is important to understand better the origin of these long-range correlations in small collision systems. In this Letter, measurements of the long-range correlations in p–Pb collisions at sNN = 5.02 TeV are extended to a pseudorapidity gap of ∆η ~ 8 between particles using the ALICE forward multiplicity detectors. After suppressing non-flow correlations, e.g., from jet and resonance decays, the ridge structure is observed to persist up to a very large gap of ∆η ~ 8 for the first time in p–Pb collisions. This shows that the collective flow-like correlations extend over an extensive pseudorapidity range also in small collision systems such as p–Pb collisions. The pseudorapidity dependence of the second-order anisotropic flow coefficient, v2(η), is extracted from the long-range correlations. The v2(η) results are presented for a wide pseudorapidity range of –3.1 < η < 4.8 in various centrality classes in p–Pb collisions. To gain a comprehensive understanding of the source of anisotropic flow in small collision systems, the v2(η) measurements are compared with hydrodynamic and transport model calculations. The comparison suggests that the final-state interactions play a dominant role in developing the anisotropic flow in small collision systems.