Next month they will begin work as members of the first full-time “female engagement teams,” the military’s name for four- and five-member units that will accompany men on patrols in Helmand Province to try to win over the rural Afghan women who are culturally off limits to outside men. The teams, which are to meet with the Afghan women in their homes, assess their need for aid and gather intelligence, are part of Gen. Stanley A. McChrystal’s campaign for Afghan hearts and minds. His officers say that you cannot gain the trust of the Afghan population if you only talk to half of it.

Image Female Marines at Camp Pendleton, Calif., will be sent to Helmand Province next month to try to win over rural Afghan women. Credit... Monica Almeida/The New York Times

“We know we can make a difference,” said Capt. Emily Naslund, 26, the team’s executive officer and second in command. Like the other 39 women, Captain Naslund volunteered for the program and radiates exuberance, but she is not naïve about the frustrations and dangers ahead. Half of the women have been deployed before, most to Iraq.

“We all know that what you expect is not usually what it’s going to end up being,” said Sgt. Melissa Hernandez, 35, who signed on because she wanted something different from her office job at Camp Victory, the American military headquarters in Baghdad.

As envisioned, the teams will work like American politicians who campaign door to door and learn what voters care about. A team is to arrive in a village, get permission from the male elder to speak with the women, settle into a compound, hand out school supplies and medicine, drink tea, make conversation and, ideally, get information about the village, local grievances and the Taliban.

Whatever the outcome, the teams reflect how much the military has adapted over nine years of war, not only in the way it fights but to the shifting gender roles within its ranks. Women make up only 6 percent of the Marine Corps, which cultivates an image as the most testosterone-fueled service, and they are still officially barred from combat branches like the infantry.