The Russian president warned that battle-hardened terrorists were “actively being drawn” to Afghanistan.