Asteroid 2009 FD could impact Earth between 2185 and 2196. The long term propagation to the possible impacts and the intervening planetary encounters make 2009 FD one of the most challenging asteroids in terms of hazard assessment. To compute accurate impact probabilities we model the Yarkovsky effect by using the available physical characterization of 2009 FD and general properties of the Near Earth Asteroid population. We perform the hazard assessment with two independent methods: the first method is a generalization of the standard impact monitoring algorithms in use by NEODyS and Sentry, while the second one is based on a Monte Carlo approach. Both methods generate orbital samples in a 7 dimensional space that includes orbital elements and the parameter characterizing the Yarkovsky effect. The highest impact probability is $2.7 times 10^{-3}$ for an impact during the 2185 Earth encounter. Impacts after 2185 corresponding to resonant returns are possible, the most relevant being in 2190 with a probability of $3 times 10^{-4}$. Both numerical methods can be used in the future to handle similar cases. The structure of resonant returns and the list of the possible keyholes on the Target Plane of the scattering encounter in 2185 can be predicted by an analytic theory.