A search for long-lived particles is performed using a data sample of 4.7 fb −1 from proton–proton collisions at a centre-of-mass energy s=7 TeV collected by the ATLAS detector at the LHC. No excess is observed above the estimated background and lower limits, at 95% confidence level, are set on the mass of the long-lived particles in different scenarios, based on their possible interactions in the inner detector, the calorimeters and the muon spectrometer. Long-lived staus in gauge-mediated SUSY-breaking models are excluded up to a mass of 300 GeV for tanβ=5–20 . Directly produced long-lived sleptons are excluded up to a mass of 278 GeV. R -hadrons, composites of gluino (stop, sbottom) and light quarks, are excluded up to a mass of 985 GeV (683 GeV, 612 GeV) when using a generic interaction model. Additionally two sets of limits on R -hadrons are obtained that are less sensitive to the interaction model for R -hadrons. One set of limits is obtained using only the inner detector and calorimeter observables, and a second set of limits is obtained based on the inner detector alone.