Background: Potential moderators such as exercise intensity or apolipoprotein-E4 (ApoE4) carriership may determine the magnitude of exercise effects on physical and cognitive functions in patients with dementia (PwD). We determined the effects of a 24-week aerobic and strength training program with a low-and high-intensity phase on physical and cognitive function. Methods: In an assessor-blinded randomized trial, 91 PwD (all-cause dementia, recruited from daycare and residential care facilities, age 82.3 ± 7.0 years, 59 women, Mini-Mental State Examination 20.2 ± 4.4) were allocated to the exercise or control group. In the exercise group, PwD participated in a walking and lower limb strength training program with 12 weeks low-and 12 weeks high-intensity training offered three times/week. Attention-matched control participants performed flexibility exercises and recreational activities. We assessed adherence, compliance, and exercise intensity for each session. We assessed physical (endurance, gait speed, mobility, balance, leg strength) and cognitive (verbal memory, visual memory, executive function, inhibitory control, psychomotor speed) functions with performance-based tests at baseline and after 6, 12, 18, 24, and 36 weeks (follow-up). ApoE4 carriership was determined post-intervention.Results: Sixty-nine PwD were analyzed. Their mean attendance was~60% during the study period. There were no significant effects of the exercise vs. control intervention on endurance, mobility, balance, and leg strength in favor of the exercise group (Cohen's d = 0.13-0.18). Gait speed significantly improved with~0.05 m/s after the high-intensity phase for exercise participants (Cohen's d = 0.41) but declined at follow-up. There were no significant effects of the exercise vs. control intervention on any of the cognitive measures (Cohen's d~− 0.04). ApoE4 carriership did not significantly moderate exercise effects on physical or cognitive function.(Continued on next page) Conclusions: Exercise was superior to control activities for gait speed in our sample of PwD. However, the training effect provided no protection for mobility loss after detraining (follow-up). There were no beneficial effects of the exercise vs. control group on cognitive function. Exercise intensity moderated the effects of exercise on gait speed. ApoE4 carriership moderated the effect of exercise on global cognition only (trend level).