NATO 's new secretary general , former Danish Prime Minister Anders Fogh Rasmussen , said Monday the alliance will stay in Afghanistan " for as long as it takes , " calling success in Afghanistan NATO 's top priority .