In the study of the decay of B mesons, the observed deviations from standard model predictions could potentially be explained by underestimated non-local hadronic intermediate states. To answer this question, the contribution of local and non-local contributions to B⁺⁻→K⁺⁻μ⁺⁻μ⁻⁺ decays are measured by analysing the invariant dimuon mass distribution in the range: 300 < m_μμ < 4700 MeV/ c² (0.09 < q² < 22.09 GeV²/c⁴). The analysis uses pp collision data collected by the LHCb experiment between 2011 and 2018 corresponding to an integrated luminosity of 9 fb⁻¹. The non-local contributions are modelled using hadronic dispersion relations including a description of intermediate one-particle and two-particle states which scatter to a pair of muons. The largest one-particle states interfering with the local contribution are J/ψ and ψ(2S) and the two-particle states described are DD, D*D* and DD*. The interference from J/ψ is observed to be small while a large component of the two-particle states, along with the ψ(2S), is observed to destructively interfere with the local contribution. The effect of this interference on the vector current (C₉) and axial-vector current (C₁₀) Wilson coefficients, which encode heavy standard model and beyond standard model physics, are discussed. The branching fractions of the one-particle and two-particle states are also measured.