(CNN) -- The U.S.-led war against the Taliban in Afghanistan has been a tough slog, a nearly eight-year conflict replete with gloom.

U.S. Staff Sergeant Robert Brunner secures an area in the Baraki Barak district of Logar Province on August 22.

Lately a lot of the news from Afghanistan seems particularly grim for the United States and its allies.

More U.S. troops have been killed there in August than in any month since the war began. There are indications that more U.S. troops could be deployed to the country.

The Afghan presidential elections this month were rife with charges of fraud. Corruption plagues the political system. The poppy trade is flourishing. And, in the words of the top U.S. military official, Adm. Mike Mullen, the "Taliban insurgency has gotten better, more sophisticated."

Support for the war hit a new low among Americans, a CNN poll found this month.

So why do the United States and its allies continue to pour money and troops into Afghanistan?

"The importance of the place is pretty substantial," said Michael O'Hanlon, senior fellow for foreign policy at the Brookings Institution.

Al Qaeda has used that part of the world as a sanctuary, he said. Neighboring Pakistan has been serious about vanquishing the militants there and that helps the fight against militants in Afghanistan. A victory for al Qaeda in a conflict there would represent an important public relations triumph for the militants, he said.

He understands why Americans are displeased but said people need to feel that progress is being made in the region.

The al Qaeda and Taliban militants in Afghanistan and Pakistan represent an urgent threat to the United States, he said in March, just as they were when al Qaeda attacked the United States in 2001, when the then-ruling Taliban harbored the terror network.

"Many people in the United States -- and many in partner countries that have sacrificed so much -- have a simple question: What is our purpose in Afghanistan?" the president said.

"After so many years, they ask, why do our men and women still fight and die there? And they deserve a straightforward answer.

"So let me be clear: Al Qaeda and its allies -- the terrorists who planned and supported the 9/11 attacks -- are in Pakistan and Afghanistan.

"Multiple intelligence estimates have warned that al Qaeda is actively planning attacks on the United States homeland from its safe haven in Pakistan. And if the Afghan government falls to the Taliban -- or allows al Qaeda to go unchallenged -- that country will again be a base for terrorists who want to kill as many of our people as they possibly can."

The questions have come up in Britain, too, where the deaths of 15 British troops in July stirred outrage and criticism of Britain's strategy in Afghanistan.

Prime Minister Gordon Brown told his countrymen that British involvement in that country now is as crucial as it was after the 2001 terrorist attacks.

"In 2001 the case for intervention in Afghanistan was to take on a global terrorist threat and prevent terrorist attacks in Britain and across the world," he said. "In 2009 the overriding reason for our continued involvement is the same -- to take on, at its source, the terrorist threat, and prevent attacks here and elsewhere."

Obama said the Afghan insurgency "feeds instability" in Pakistan and Pakistan extremists have the proven ability to undermine the Afghan government. He cited the importance of confronting the heroin trade that finances the insurgency.

Obama has listed several objectives in dealing with Afghanistan and Pakistan, such as promoting an accountable Afghan government and self-reliant security forces, developing a stable government and strong economy in Pakistan, and disrupting terror networks.

Pakistani security forces have been battling militants in the northwestern part of the country, and drone strikes thought to be conducted by the United States have been carried out from Afghanistan against militants in Pakistan.

"The future of Afghanistan is inextricably linked to the future of its neighbor, Pakistan," Obama said. "In the nearly eight years since 9/11, al Qaeda and its extremist allies have moved across the border to the remote areas of the Pakistani frontier.

"This almost certainly includes al Qaeda's leadership: Osama bin Laden and Ayman al-Zawahiri. They have used this mountainous terrain as a safe haven to hide, to train terrorists, to communicate with followers, to plot attacks, and to send fighters to support the insurgency in Afghanistan. For the American people, this border region has become the most dangerous place in the world."

In Britain, Brown said the military effort to clear a region and establish security would be buttressed by Afghan plans "to build basic services -- clean water, electricity, roads, basic justice, basic health care, and then economic development."

"This inevitably takes time, but the important thing is that work has begun, to give the people a stake in the future," he said.

U.S. Sen. Jim Webb, Democrat-Virginia, said in a recent TV interview that he has "a lot of concerns about the way we've articulated our national goals in Afghanistan."

"I think that it is extremely important for us to be able to articulate the end point of our strategy, just as it was in Iraq," he said.

While there is grim news on the ground in Afghanistan, the picture painted by the president in March was a red alert for Americans: It's a tough but necessary fight that requires patience and resources.

"There are no quick fixes to achieve U.S. national security interests in Afghanistan and Pakistan," Obama said. "The danger of failure is real and the implications are grave."