A search for pair production of squarks or gluinos decaying via sleptons or weak bosons is reported. The search targets a final state with exactly two leptons with same-sign electric charge or at least three leptons without any charge requirement. The analysed data set corresponds to an integrated luminosity of 139 fb−1 of proton-proton collisions collected at a centre-of-mass energy of 13 TeV with the ATLAS detector at the LHC. Multiple signal regions are defined, targeting several SUSY simplified models yielding the desired final states. A single control region is used to constrain the normalisation of the WZ + jets background. No significant excess of events over the Standard Model expectation is observed. The results are interpreted in the context of several supersymmetric models featuring R-parity conservation or R-parity violation, yielding exclusion limits surpassing those from previous searches. In models considering gluino (squark) pair production, gluino (squark) masses up to 2.2 (1.7) TeV are excluded at 95% confidence level.