A likelihood-based discriminant for the identification of quark- and gluon-initiated jets is built and validated using 4.7 fb(Formula presented.) of proton–proton collision data at (Formula presented.) collected with the ATLAS detector at the LHC. Data samples with enriched quark or gluon content are used in the construction and validation of templates of jet properties that are the input to the likelihood-based discriminant. The discriminating power of the jet tagger is established in both data and Monte Carlo samples within a systematic uncertainty of (Formula presented.) 10–20 %. In data, light-quark jets can be tagged with an efficiency of (Formula presented.) while achieving a gluon-jet mis-tag rate of (Formula presented.) in a (Formula presented.) range between (Formula presented.) and (Formula presented.) for jets in the acceptance of the tracker. The rejection of gluon-jets found in the data is significantly below what is attainable using a Pythia 6 Monte Carlo simulation, where gluon-jet mis-tag rates of 10 % can be reached for a 50 % selection efficiency of light-quark jets using the same jet properties.