The top NATO commander in Afghanistan says hardfought gains by alliance troops this year could be lost , if Afghan security forces fail to hold ground seized from the Taleban .