WASHINGTON — Marines were on a foot patrol last fall in the Taliban stronghold of Marja, Afghanistan, when they shot and killed a lethal threat: a local dog that made the mistake of attacking the Marines’ Labrador retriever.

Capt. Manuel Zepeda, the commander of Company F, Second Battalion, Sixth Marines, was unapologetic. If the Lab on the patrol had been hurt, the Marines would have lost their best weapon for detecting roadside bombs — and would have called for a medevac helicopter, just as they would for a human. An attack on the Lab was an attack on a fellow warrior.

As Captain Zepeda put it that day, “We consider the dog another Marine.”

The classified canine that went on the Navy Seals’ raid of Osama bin Laden’s compound last week has generated a wave of interest in military dogs, which have been used by the United States since at least World War I. Now, more valued than ever, they are on their own surge into Afghanistan.

American troops may be starting to come home this summer, but more dogs are going in. In 2007, the Marines began a pilot program in Afghanistan with nine bomb-sniffing dogs, a number that has grown to 350 and is expected to reach nearly 650 by the end of the year. Over all, there are some 2,700 dogs on active duty in the American military. A decade ago, before the Sept. 11 attacks, there were 1,800.