Among people who are hospitalised for community-acquired pneumonia, does an inpatient exercise-based rehabilitation program improve functional outcomes, symptoms, quality of life and length of hospital stay more than a respiratory physiotherapy regimen?Randomised trial with concealed allocation, intention-to-treat analysis and blinding of some outcomes.Forty-nine adults hospitalised for community-acquired pneumonia.The experimental group (n=32) underwent a physical training program that included warm-up, stretching, peripheral muscle strength training and walking at a controlled speed for 15 minutes. The control group (n=17) underwent a respiratory physiotherapy regimen that included percussion, vibrocompression, respiratory exercises and free walking. The intervention regimens lasted 8 days.The primary outcome was the Glittre Activities of Daily Living test, which assesses the time taken to complete a series of functional tasks (eg, rising from a chair, walking, stairs, lifting and bending). Secondary outcomes were distance walked in the incremental shuttle walk test, peripheral muscle strength, quality of life, dyspnoea, lung function, C-reactive protein and length of hospital stay. Measures were taken 1 day before and 1 day after the intervention period.There was greater improvement in the experimental group than in the control group on the Glittre Activities of Daily Living test (mean between-group difference 39 seconds, 95% CI 20 to 59) and the incremental shuttle walk test (mean between-group difference 130 m, 95% CI 77 to 182). There were also significantly greater improvements in quality of life, dyspnoea and peripheral muscle strength in the experimental group than in the control group. There were no between-group differences in lung function, C-reactive protein or length of hospital stay.The improvement in functional outcomes after an inpatient rehabilitation program was greater than the improvement after standard respiratory physiotherapy. The exercise training program led to greater benefits in functional capacity, peripheral muscle strength, dyspnoea and quality of life.ClinicalTrials.gov, NCT02103400.