The identification of b-jets, referred to as b-tagging, is an important part of many physics analyses in the ATLAS experiment at the Large Hadron Collider and an accurate calibration of its performance is essential for high-quality physics results. This publication describes the calibration of the light-flavour jet mistagging efficiency in a data sample of proton–proton collision events at sqrt{s}=13 TeV corresponding to an integrated luminosity of 139 fb^{-1}. The calibration is performed in a sample of Z bosons produced in association with jets. Due to the low mistagging efficiency for light-flavour jets, a method which uses modified versions of the b-tagging algorithms referred to as flip taggers is used in this work. A fit to the jet-flavour-sensitive secondary-vertex mass is performed to extract a scale factor from data, to correct the light-flavour jet mistagging efficiency in Monte Carlo simulations, while simultaneously correcting the b-jet efficiency. With this procedure, uncertainties coming from the modeling of jets from heavy-flavour hadrons are considerably lower than in previous calibrations of the mistagging scale factors, where they were dominant. The scale factors obtained in this calibration are consistent with unity within uncertainties.