ASH SHURA, Iraq — Technically, American soldiers have stopped fighting in Iraq. But they can fire back when attacked, which happens frequently in this village of wheat and barley farmers, as well as an uncomfortable number of Baathist insurgents.

So much so that, while United States troops in nearly all other parts of the nation are quietly preparing to withdraw, soldiers stationed here are fighting what looks, for now, like the last American combat in the seven-year war in Iraq.

“They only attack Americans,” said Capt. Russell B. Thomas, the commander of Alpha Company of the First Battalion of the Third Infantry Division’s Second Brigade.

They may only attack Americans now, but with all combat troops scheduled to leave Iraq by the end of August, military commanders worry that this area in northern Iraq offers a glimpse of a post-American Sunni insurgency, led by former Saddam Hussein loyalists intent on overthrowing the Shiite-dominated central government.

Some in the American military view the insurgents in this area, a group called the Men of the Army of Al Naqshbandia Order, as a greater long-term threat to stability here than Al Qaeda in Mesopotamia, whose top leadership was recently killed by American and Iraqi forces not far from this village.

Lt. Col. Michael A. Marti, an intelligence officer with Task Force Marne, Third Infantry Division, said the group had a more cohesive militarylike structure than Al Qaeda — many were military officers under Mr. Hussein— and the worry among American military officers is that once the Americans leave they will turn toward attacking Iraqis. Many experts say the probability goes up if the nation’s Shiite majority does not give Sunnis a meaningful role in the new government being formed now in Baghdad. Under Mr. Hussein’s government, Sunnis, while a minority in Iraq, were in power.

“There’s a longing to return to that,” Colonel Marti said.

In most of the country, the Iraqi Army and the police are the visible face of security, with Americans largely out of public view. Not here. When American units left city centers last June, they largely took on advisory roles, training Iraqi security forces and responding to attacks only rarely and only at the request of the Iraqis.

In this village, the Iraqi security forces are more thinly staffed than elsewhere in the country, and a liberal interpretation of the security agreement that binds Iraq and the United States has Americans playing a more active role on the streets and in the scrublands of this village, than in many places in Iraq.

“There is no battalion right now in Iraq that has this lethal fight,” said Lt. Col. Richard R. Coffman, commander of the First Battalion, 64th Armor Regiment, of the Third Infantry Division’s Second Brigade.

In recent weeks the United States military announced that several of the top Qaeda figures were killed in northern Iraq, the result of joint operations between Iraqis and Americans. The military announced that one of those leaders, Abu Suhaib, was killed by Iraqi security forces. In fact, according to Lt. Col. Michael Jason, the brigade operations officer for the Third Infantry Division’s Second Brigade near Mosul, it was an American unit firing from a Bradley Fighting Vehicle that killed Mr. Suhaib.

In an e-mail message, a representative of the United States military wrote, “While Bradley fighting vehicles were at the scene and did provide cover fire, it does appear that direct fire from I.S.F. is what ultimately lead to the death of Abu Suhaib.”

Either way, the operations make clear that Americans are involved in combat operations here more than elsewhere in Iraq. Under the security agreement, Americans can act unilaterally only to protect themselves. Otherwise they are required to work with Iraqi security forces and at their request.

Here, where the danger is still high, the lines of the agreement blur a bit. “I thought we wouldn’t be able to go anywhere without an Iraqi vehicle with us,” said Captain Thomas, 28, from Eagle Lake, Tex. “In the spirit of the agreement I always have an I.S.F. personnel with us.” He was using the military abbreviation for Iraqi security forces.

Often, a group of American soldiers heading on patrol will stop and pick up an Iraqi soldier from an adjacent base to accompany them, or will link up with a police officer in the village.

After seven years of war, this is what the final days of the combat mission looks like for these American soldiers, a complex mix of fighting and rebuilding, preparing to leave while not losing sight of the still active threat.

In the darkness, marksmen crouch in tall reeds near a berm alongside the railroad tracks, watching spots where militants have been laying bombs. In daylight, soldiers visit Iraqi police checkpoints, questioning and frisking drivers and searching trunks, hoping their presence disrupts militants who have been shooting mortars at their outpost.

“We’re the battalion that never sleeps,” Colonel Coffman said.

On one recent patrol they handed out small grants to local businesses — $1,000 or so to a bakery or shop. On another, they walked through the village, stopping at the home of someone suspected of being an insurgent. During the same patrol, they visited metal workers about building soccer bleachers.

Their presence in the village, though, had a more urgent purpose. “We’ve been getting mortared at night,” Captain Thomas said. “I think they’re going to switch to daytime. This will let them know that daytime isn’t good to go.”

Since arriving in November, the company here has faced attack — from mortars, roadside bombs or rifles — once every two or three days. No soldiers have died. One is being treated at Walter Reed Army Medical Center in Washington for wounds. Two soldiers from the same battalion, but from a different company at a base east of here, were killed last month when their vehicle hit an improvised explosive device.

The soldiers say they have seen more action than they expected — in contrast to elsewhere in Iraq, where young soldiers have been disappointed that they have not been tested in combat. Some were awarded Bronze Stars for a night-time operation in which they killed insurgents laying roadside bombs. Purple Hearts have been awarded, and many have qualified for Combat Action Badges.

For almost 40 percent of the company, it is the first time in Iraq. For one, it is the fifth.

“When we were briefed it was almost like a peacekeeping mission,” said Sgt. Mark L. Norfleet, 30, from Uniontown, Ala., referring to the briefing before his current deployment. But, he said, “There’s no peace in Iraq.”

http://www.nytimes.com/2010/05/15/world/middleeast/15base.html