A search for direct pair production of the supersymmetric partner of the top quark, decaying via a scalar tau to a nearly massless gravitino, has been performed using 20 fb (Formula presented.) of proton–proton collision data at (Formula presented.). The data were collected by the ATLAS experiment at the LHC in 2012. Top squark candidates are searched for in events with either two hadronically decaying tau leptons, one hadronically decaying tau and one light lepton, or two light leptons. No significant excess over the Standard Model expectation is found. Exclusion limits at (Formula presented.) confidence level are set as a function of the top squark and scalar tau masses. Depending on the scalar tau mass, ranging from the (Formula presented.) LEP limit to the top squark mass, lower limits between 490 and (Formula presented.) are placed on the top squark mass within the model considered.