The Twitter war began in earnest Sept. 14, in the midst of a sustained attack on the U.S. Embassy in Kabul and the adjacent headquarters of the U.S.-led international military force.

Until then, NATO officials had kept close tabs on the messages posted on two accounts linked to the Taliban’s media arm — but had refrained from engaging or acknowledging them.

U.S. military officials assigned to the International Security Assistance Force, or ISAF, as the coalition is known, took the first shot in what has become a near-daily battle waged with broadsides that must be kept to 140 characters.

“How much longer will terrorists put innocent Afghans in harm’s way,” @isafmedia demanded of the Taliban spokesman on the second day of the embassy attack, in which militants lobbed rockets and sprayed gunfire from a building under construction.

“I dnt knw. U hve bn pttng thm n ‘harm’s way’ fr da pst 10 yrs. Razd whole vilgs n mrkts. n stil hv da nrve to tlk bout ‘harm’s way,’ ” responded Abdulqahar Balkhi, one of the Taliban’s Twitter warriors, who uses the handle ­@ABalkhi.

The running spat appears to be the sole open line of communication between Americans and the Taliban after exploratory peace talks collapsed this year. U.S. military officials say the dramatic assault on the diplomatic compound convinced them that they needed to seize the propaganda initiative — and that in Twitter, they had a tool at hand that could shape the narrative much more quickly than news releases or responses to individual queries.

“That was the day ISAF turned the page from being passive,” said Navy Lt. Cmdr. Brian Badura, a military spokesman, explaining how @isafmedia evolved after the attack. “It used to be a tool to regurgitate the company line. We’ve turned it into what it can be.”

Spreading the message

It’s hard to say who is winning the war of words. If the number of followers is the benchmark, @isafmedia is far ahead. Over the past year, the number of users following the coalition has swelled from 736 to nearly 18,000. The two Taliban accounts — @alemarahweb, which mainly links to news releases and official statements, and the more pugnacious @ABalkhi — have just over 9,000 combined.

Many terrorist organizations maintain sophisticated Web sites and aggressive social media operations, despite widely suspected efforts by Western intelligence agencies to hack into and deactivate their online sites.

U.S. officials have grown increasingly concerned about extremists’ stepped-up activity on social media sites, citing cases in which Americans have been recruited online by terrorists overseas. The House Homeland Security subcommittee on counterterrorism and intelligence convened a hearing this month on how jihadists were using social media.

“Terrorist networks are spreading their message, recruiting sympathizers and are connecting operationally online,” subcommittee chairman Patrick Meehan (R-Pa.) said in opening remarks, according to a transcript.

Although the Taliban is not the only extremist group on Twitter, it appears to be the only one exchanging regular tweets with the U.S. military.

Just who is tweeting on behalf of the Taliban is a mystery, U.S. military officials say, speculating that their interlocutors could be waging cyberwar from Afghanistan, Pakistan or a cozy apartment somewhere in Europe. Their messages indicate that whoever is at the keyboard gets quick, if sometimes inaccurate, reports from the field, the military’s cyberwarriors say.

“They have a good tie to operational intelligence,” said Lt. Col. Jimmie Cummings, a Twitter novice who has become one of the brains behind the @isafmedia account.

In tweets, the Taliban calls foreign troops “invaders” and Afghan security forces “puppets” or “cowards.” Most coalition vehicles that are reportedly blown up are referred to as “tanks,” even though there are relatively few tanks in the fight. Reports of battlefield victories are grossly exaggerated, U.S. military officials say.

“Most of the stuff we see is propaganda,” Cummings said. “One of the reasons we started putting emphasis on this is that every once in a while, the average follower might think this is sort of true.”

‘An awakening’

ISAF’s public affairs staff members, who work out of a crammed, second-story office with fluorescent lights, do not respond to every Taliban tweet. The primary account user for @isafmedia, whom Cummings and Badura declined to identify, usually flags something the Taliban has posted. Those present discuss whether to go on the offensive or just lay low.

“We pick and choose,” Cummings said.

That way, he and Badura said, they feel they have elevated the level of discourse — at least as much as enemies fighting deadly battles can.

“If you look at the chronology over the past six months, it does look like there have been some changes in their content and claims,” Badura said. “They realize that we pay closer attention and are going to call them on it when we realize there is something completely sensational or inaccurate.”

But the sharp swipes continue. On Dec. 9, @ABalkhi tweeted that “@isafmedia continue genocide of Afghans: ISAF terrorists beat defenseless man to death.”

@isafmedia shot back: “Sorry @ABalkhi: looting and beating innocents NOT part of ISAF practices during routine searches”

@ABalkhi had the last word in that exchange, linking to a video depicting abuse by a rogue platoon of soldiers who were accused of killing Afghan civilians for sport in Kandahar province during the summer of 2010. “@isafmedia too true. You only shoot and loot for fun!!!” the Taliban operative wrote.

Badura and Cummings said they don’t have a strong opinion about whether groups such as the Taliban should be given a platform on mainstream social media sites. The Taliban accounts do not appear to violate Twitter’s guidelines. As long as their enemy continues tweeting, they said, the U.S. military will keep hitting reply.

“One might argue that those platforms should remain as open as possible,” Badura said. “What we’re seeing is that just as we’ve recognized the value, so have they. We’ve had an awakening, and we’re not leaving that battle space unchallenged.”