Background: Implanted peroneal functional electrical stimulation (FES) is an effective alternative treatment to ankle-foot orthosis (AFO) in people with drop foot after stroke. With FES no constraints on ankle mobility are imposed which might particularly be exploited in challenging walking environments that require adaptations of the gait pattern to environmental disturbances. Research question: Is gait adaptability, by means of the capacity to avoid sudden obstacles while walking on a treadmill, superior with implanted FES compared to AFO in people with drop foot after stroke? Methods: A 4-channel peroneal nerve stimulator (ActiGait®) was implanted in 22 persons with stroke (>6 months) who regularly used an AFO. Gait adaptability was tested with an obstacle avoidance task on an instrumented treadmill up to 26 weeks (n = 10) or 52 weeks (n = 12) after FES-system activation. At assessments, 30 trials, in which obstacles were suddenly dropped onto the treadmill in front of the paretic leg, were recorded with each device (FES / AFO). Trials were grouped by available response times (ART) and success rates were calculated. The effect of device, ART and follow up time on success rates was tested using generalized estimated equations. Nonparametric correlations were calculated to associate changes in success rates with clinimetrics. Results: Success rates of obstacle avoidance were higher when participants used their FES system compared to AFO (Δ4.7%, p = 0.03), which effect was largest for longest ARTs (Δ15%, p = 0.03). Participants with greater motor impairment of the paretic leg showed greater benefit from FES (r s =-0.49, p = 0.04). Significance: FES has been found equally effective as AFO in improving walking speed of people with drop foot after stroke. We now present superior walking performance in a complex walking environment for implanted peroneal FES compared to AFO. These findings underline the importance of using gait assessments that require interplay with the environment, besides assessment of stationary walking, in community ambulators.