Background: The Physical Function Trial (PFT) was one of seven Testosterone Trials (TTrials), the aim of which was to assess the effect of testosterone on mobility, self-reported physical function, falls, and patient global impression-of-change (PGIC) in older men with low testosterone concentrations, self-reported mobility limitation, and walking speed of less than 1·2 m/s. Using data from the PFT and the overall TTrials study population, we also aimed to identify whether the effect of testosterone on mobility differed according to baseline walking speed, mobility limitation, or other participant-level factors. Methods: The TTrials included 790 men aged 65 years or older and with an average of two total testosterone concentrations below 275 ng/dL (9·5 nmol/L), of whom 390 had mobility limitation and a walking speed below 1·2 m/s and were enrolled in the PFT. Participants were assigned (by minimisation method) to 1% testosterone gel or placebo gel daily for 12 months, with participants and study staff masked to intervention allocation. The primary outcome of the PFT was an increase in 6 min walk test (6MWT) distance of 50 m or more. Here we report data for absolute change in 6MWT distance and physical component of Short Form-36 (PF10), and for PGIC and falls. Data are reported for men enrolled in the PFT and those who were not, and for all men in TTrials; data are also reported according to baseline walking speed and mobility limitation. Analyses were done in a modified intention-to-treat population in all patients who were allocated to treatment, had a baseline assessment, and at least one post-intervention assessment. The TTrials are registered with ClinicalTrials.gov, number NCT00799617. Findings: The TTrials took place between April 28, 2011 and June 16, 2014. Of 790 TTrials participants, 395 were allocated to testosterone and 395 to placebo; of the 390 participants enrolled in the PFT, 193 were allocated to testosterone and 197 to placebo. As reported previously, 6MWT distance improved significantly more in the testosterone than in the placebo group among all men in the TTrials, but not in those who were enrolled in the PFT; among TTrials participants not enrolled in the PFT, 6MWT distance improved with a treatment effect of 8·9 m (95% CI 2·2–15·6; p=0·010). As reported previously, PF10 improved more in the testosterone group than in the placebo group in all men in TTrials and in men enrolled in the PFT; among those not enrolled in the PFT, PF10 improved with an effect size of 4·0 (1·5–6·5; p=0·0019). Testosterone-treated men with baseline walking speed of 1·2 m/s or higher had significantly greater improvements in 6MWT distance (treatment effect 14·2 m, 6·5–21·9; p=0·0004) and PF10 (4·9, 2·2–7·7; p=0·0005) than placebo-treated men. Testosterone-treated men reporting mobility limitation showed significantly more improvement in 6MWT distance (7·6 m, 1·0–14·1; p=0·0237) and PF10 (3·6, 1·3–5·9; p=0·0018) than placebo-treated men. Men in the testosterone group were more likely to perceive improvement in their walking ability (PGIC) than men in the placebo group, both for men enrolled in the PFT (effect size 2·21, 1·35–3·63; p=0·0018) and those not enrolled in the PFT (3·01, 1·61–5·63; p=0·0006). Changes in 6MWT distance were significantly associated with changes in testosterone, free testosterone, dihydrotestosterone, and haemoglobin concentrations. Fall frequency during the intervention period was identical in the two treatment groups of the TTrials (103 [27%] of 380 analysed in both groups had at least one fall). Interpretation: Testosterone therapy consistently improved self-reported walking ability, modestly improved 6MWT distance (across all TTtrials participants), but did not affect falls. The effect of testosterone on mobility measures were related to baseline gait speed and self-reported mobility limitation, and changes in testosterone and haemoglobin concentrations. Funding: US National Institute on Aging and AbbVie.