KANDAHAR CITY (Reuters/AFP) - Militants operating out of safe havens in Pakistan remain a major threat to Afghanistan but cooperation between NATO-led forces and the Pakistani military is increasing, US Defence Secretary Robert Gates said on Friday. Devastating floods over the past month have delayed Pakistans military from going after militants in the Federally Administered Tribal Areas (FATA) and North Waziristan. Gates travelled to Kandahar, the birthplace of the Taliban in Afghanistans south, to visit US troops. He said he and Afghanistan President Hamid Karzai agreed on the need for stepped up cooperation between the NATO-led International Security Assistance Force (ISAF) and the Pakistani military to get rid of insurgent sanctuaries. Cooperation between the two is increasing and everybody understands that the sanctuaries on the other side of the border are a big problem, Gates told reporters. However, he said the likelihood of direct US military engagement in Pakistan was very low. He praised Pakistans moves against extremist cells based in the border regions, saying their operations in South Waziristan really flushed a lot of these groups including a lot of Al-Qaeda that have fled to North Waziristan. But he said that devastating floods in Pakistan could delay further operations. Unfortunately the flooding in Pakistan is probably going to delay any operations by the Pakistani army in North Waziristan for some period of time, Gates said. But I think the solution here is ISAF, Afghan, Pakistani cooperation to take care of these targets, he said. Gates arrived in Afghanistan on Thursday from Baghdad, where he attended ceremonies to mark the end of US combat operations there after seven years. That milestone has shifted the US military focus back onto Afghanistan at a time when the US public, and even some within Obamas Democratic party, are becoming increasingly sceptical about whether the war is worth fighting. The past week has been especially difficult, with 20 US soldiers killed in one four-day period. Seven were killed in two roadside bomb attacks on Monday. Gates visited a base where the seven had been stationed. You guys are in the forward foxhole and what makes a difference in this whole campaign is your success here in Kandahar City, he told the troops. Unfortunately there are going to be more tough days ahead and you know that better than anybody, he said. Pentagon spokesman Geoff Morrell said the visit was a chance for Gates to talk to troops at the tip of the spear in the war against the militants. At a joint news conference with President Hamid Karzai on Thursday, Gates said the surge of 30,000 additional troops ordered by President Barack Obama was nearly complete. The extra deployment will push the international force to a full strength of 150,000 as part of the US-led counterinsurgency campaign aimed at hastening an end to the long war. Gates was more upbeat in his assessment of the strategy, which was announced by Obama last December when he ordered the surge. The question to be addressed in December is whether the strategy is working, he said, adding: Based on what Ive seen here today I am hopeful that we will be in that position.