A search for the direct production of the supersymmetric partners of τ-leptons (staus) in final states with two hadronically decaying τ-leptons is presented. The analysis uses a dataset of pp collisions corresponding to an integrated luminosity of 139 fb-1, recorded with the ATLAS detector at the Large Hadron Collider at a center-of-mass energy of 13 TeV. No significant deviation from the expected Standard Model background is observed. Limits are derived in scenarios of direct production of stau pairs with each stau decaying into the stable lightest neutralino and one τ-lepton in simplified models where the two stau mass eigenstates are degenerate. Stau masses from 120 GeV to 390 GeV are excluded at 95% confidence level for a massless lightest neutralino.