Less than 12 hours after NATO troops in Afghanistan defeated an ambitious attempt by the Taliban to storm a provincial capital in the far southwest, killing dozens of the fighters, the top American commander in the country urged doubters Sunday to believe that the war against the Taliban would be won. The commander, Gen. David D. McKiernan, who leads more than 65,000 troops from about 40 foreign countries, including 33,000 Americans, said at a news conference in Kabul that there had been "too many" reports in the media recently asserting that the foreign forces and their Afghan allies were losing the war. "I absolutely reject that idea, I don't believe it," the general said, adding: "It is true that there are many places in this country that don't have an adequate level of security. We don't have progress as even and as fast as any of us would like. But we are not losing in Afghanistan." At another point, he was more emphatic. There are major challenges facing the war effort, he said, "But we will win." The news conference was held on the general's return from Washington, where he participated in a wide-ranging review of war strategy in Afghanistan. Earlier, the NATO command confirmed that its forces battled several hundred Taliban fighters at nightfall on Saturday as they prepared to attack Lashkar Gah, the capital of Helmand Province, the center of Afghanistan's opium trade and one of the most heavily contested battlefields of the war. A statement by the International Security Assistance Force, the official name of the NATO operation commanded by General McKiernan, said it had attacked the Taliban fighters at 7:30 p.m. Saturday, when the Taliban were preparing to launch a mortar attack on the city. At his news conference, General McKiernan said that fighting had continued until daybreak on Sunday, and that "a large number of Taliban" had been killed. Dawood Ahmadi, a spokesman for the provincial governor, said by telephone that 62 Taliban fighters had been killed. The spokesman said that a separate battle by Afghan and NATO troops to regain control of Nadali District, 15 miles west of Lashkar Gah, had ended Saturday after two days and that 40 Taliban fighters had been killed there. If accurate, the figures would make the fighting among the most intensive that NATO forces have experienced with the resurgent Taliban. Lt. Col. Woody Page, a spokesman for the British forces in Helmand, said that about 50 Taliban were killed at Lashkar Gah, according to Agence France-Presse. He also confirmed that the Taliban had been driven out of Nadali, but he did not give a Taliban death toll there. The NATO command statement said that its forces at Lashkar Gah had reacted to the sighting of Taliban fighters assembling outside the city by conducting an airstrike "in which multiple enemy forces were killed," and that the strike was combined with a ground assault involving NATO and Afghan forces.