WASHINGTON (CNN) -- The U.S. is "running out of time" to win the war in Afghanistan, and sending in more troops will not guarantee victory, the chairman of the Joint Chiefs of Staff, Adm. Michael Mullen, warned Congress on Wednesday.

Adm. Michael Mullen tells a congressional committee Wednesday that the war in Afghanistan is winnable.

At the same hearing, Defense Secretary Robert Gates said the conflict in Iraq has entered the "endgame" but said that the situation there remains fragile and that U.S. decisions in the coming months "will be critical to regional stability and our national security interests in the years to come."

Mullen's and Gates' remarks to the House Armed Services Committee came a day after President Bush announced troop reductions in Iraq and the deployment of 4,500 additional troops in Afghanistan.

Mullen said he is convinced the Afghanistan war can be won but said the U.S. urgently needs to improve its nation-building initiatives and its cross-border strategy with Pakistan.

"We can't kill our way to victory, and no armed force anywhere -- no matter how good -- can deliver these keys alone. It requires teamwork and cooperation," Mullen said.

Mullen appeared before the House panel a day before the seventh anniversary of the September 11 attacks, which prompted the U.S.-led invasion of Afghanistan.

Militants have re-established their presence in Afghanistan after U.S. and British troops entered the country in October 2001 and ousted the Taliban government, which was harboring al Qaeda, the terrorist group behind the September 11 attacks. And Mullen said these militants have grown "bolder."

Cross-border attacks into Afghanistan by militants in Pakistan's tribal region are a problem, and the U.S. has deployed Predator drones to attack targets in Pakistan. Last week, U.S. troops entered Pakistan, a move that prompted condemnation from Islamabad.

Mullen stressed that Afghanistan can't be referenced without "speaking of Pakistan," where, he said, the militant groups collaborate and communicate better, launch more sophisticated attacks, employ foreign fighters and use civilians as human shields.

"In my view, these two nations are inextricably linked in a common insurgency that crosses the border between them," he said, adding that he plans "to commission a new, more comprehensive strategy for the region, one that covers both sides of the border.

"I have pressed hard on my counterparts in Pakistan to do more against extremists and to let us do more to help them," he said.

The conflict is exacerbated, he said, by the "poor and struggling Afghan economy" as well as the drug trade and "significant political uncertainty in Pakistan." These factors present a "complex, difficult struggle."

Mullen said that he has urged the "growth and training" of Afghan forces and that U.S. military officials recommend the deployment of a Marine battalion this fall and another Army unit early next year, which Bush announced Tuesday.

Bush also announced that about 8,000 U.S. troops soon will be coming home from Iraq, and Gates told the committee Wednesday that the "continuing drawdown is possible because of the success in reducing violence and building Iraqi security capacity."

The U.S. probably will remain in Iraq for years in roles that will change and become more limited over time, he said.

"Even with fewer U.S. troops in Iraq, the positive trends of the last year have held and in some cases steadily continued in the right direction," Gates said. "Our casualties have been greatly reduced -- even though one is too many -- and overall violence is down."

Rep. Ike Skelton, D-Missouri, the committee's chairman, asked whether Iraq remains the higher priority.

The defense secretary said he doesn't think importance can be conveyed in a "mathematical equation."

"I would say success in Iraq means we are steadily reducing our commitment -- our level of commitment and resources, particularly manpower -- for that theater," Gates said. "At the same time we are able, under those circumstances, to increase our level of commitment and resources to Afghanistan."

Mullen said both conflicts are high priorities.

As for Afghanistan, the imminent deployments are not enough for now, but they represent "a good start," Mullen said. There are more than 30,000 U.S. troops under coalition and NATO commands in Afghanistan.

"Frankly, I judge the risk of not sending them too great a risk to ignore. My expectation is that they will need to perform both the training mission and combat and combat support missions simultaneously until such time that we can provide additional troops. I cannot at this point say when that might be," he said.

He said he's confident that Afghan security forces can be trained and developed.

"In fact, they are on track to reach a total end strength of 162,000 troops by 2010. The Marines conducting their training are doing a phenomenal job," he said.

At the same time, Mullen warned "that no amount of troops in no amount of time can ever achieve all the objectives we seek."

Until Afghan security forces gain the backing of local leaders to improve security, "we will only be as much as a crutch, and a temporary one at that," the admiral said.

"We can hunt down and kill extremists as they cross over the border from Pakistan, as I watched us do during a daylong trip to the Korengal Valley in July. But until we work more closely with the Pakistani government to eliminate the safe havens from which they operate, the enemy will only keep coming," he said.

Mullen also said roads, schools and courts can be built and repaired, but that work is not enough, either. Afghanistan needs more experts in commerce, agriculture, jurisprudence and education. The nation also needs "foreign investment, alternative crops, sound governance and the rule of law."

Until then, Mullen said, these institutions "will remain but empty shells."

All About Afghanistan War • Michael G. Mullen • Pakistan • Robert Gates