By Tom Coghlan in Khost, Afghanistan
The people of one ramshackle village near Khost in eastern Afghanistan were effusive in their thanks to the US troops.
Children receive bags from US soldiers in a Khost village
Their village school had been nothing more than a blackboard in a courtyard.
Then the locally based US forces gave them money for a well-equipped, stone-built school.
Clutching a thick wad of banknotes, the first half of the $12,000 cost, the village teacher spoke earnestly to the US Marine captain in charge of the project.
"Please don't go back to America until the new school is finished," she said. The school was ready in less than a month.
Increased aid work
That's good news for the village children.
However, this project highlights the rift that is growing in Afghanistan between the US-led coalition forces and the aid agencies working in the country.
At its root lies the military strategy of using reconstruction work to win popular support while simultaneously conducting robust anti-Taleban operations.
NGOs say the US military's aid is often just feel good projects
US forces in the south and east of the country believe their tactics have been extremely effective.
But French charity Medecins Sans Frontieres, which pulled out of Afghanistan in June after an attack that killed five of its workers, has denounced the coalition for using humanitarian aid to "win hearts and minds".
"By doing so, providing aid is no longer seen as an impartial and neutral act...[it endangers] the lives of humanitarian volunteers and jeopardises the aid to people in need," it said.
Since then the US military has, if anything, increased its aid work.
A day after the villagers in Khost received the money for their new school, the same company of Marines was on a very different mission 10 miles to the west.
Marines raid a suspected Taleban bomb maker's compound
They had intelligence identifying a walled compound as belonging to a Taleban bomb maker.
In darkness 120 Marines surrounded the building.
As a two-minute ultimatum was delivered by loudspeaker an elderly man opened the door.
He was wrestled to the ground and the Marines swarmed into the compound, guns levelled.
The male occupants were bound and interrogated. No bomb-making equipment was found. An hour later the American officers released the prisoners and apologised.
"Tell this man he can come to our base and we will compensate him for any loss," said the Marine officer.
"Tell him he can also discuss any projects that the village might feel they need doing to improve their lives."
'Bad social development'
The old man did not come to the US base. The Marines based in Khost have spent almost $1m to build schools, clinics, wells, irrigation systems and the first plumbing systems in several villages in the past six months.
They are proud of their efforts. "We must, to win the war here, gain the trust of the population," says their commanding officer, Colonel Gary Cheek.
"And so, while we are trying to foster security for this country, we are also using construction to gain the trust of the civilian population."
Paul Barker, of the charity CARE, questions the value of the military's efforts: "We tend to feel that most of these projects are feel-good projects and are done because they can be done fast and the community will accept them because they get something for nothing.
"But it is very bad social development. There is no engagement period and no time taken to ensure that the right people are getting the aid."
The Marines argue they have little alternative.
"Would you have us stop doing all reconstruction and just leave it to the NGOs which are wholly under-funded?" asks Colonel Cheek.
"I don't think it is unfair to say they are less efficient. We tend to be very mission-focused in the military. We get it done as quickly as we are able to."
The contrast of styles is all too apparent.
Linking aid and military work erodes trust, aid agencies say
"I think most aid organisations here are concerned about the blurring of the military-civilian boundary," says Sarah Ireland
from the British charity Oxfam.
"Here in Afghanistan it is really quite marked."
That's the main reason that aid workers believe Afghanistan has become so dangerous for them.
This year 21 aid workers have died, compared to 13 in 2003 and none in 2002.
Where both the military and aid agencies deliver the same aid, she argues, this makes it harder for communities to distinguish between them.
"It erodes that trust we have with communities that have kept us safe."
The Marines dismiss this as an easy argument.
"I don't think they give the local population enough credit," says Colonel Cheek.
"If anybody knows how to deal with NGOs it is Afghanistan. They have had them here for 30 years."
He also points out that the military is the only organisation able to operate in many of the more hostile areas of the country.
The arguments on both sides are powerful, but the Marine captain who built the school believes the debate is no longer relevant.
"It is not what you do, but who you are that the extremists hate," he says. "That is what people have discovered in Iraq. Now they are learning it here."