Capt Ashley Collette was the only woman in her platoon of soldiers on the Afghan front line - and she was in charge. In the Canadian armed forces, unusually, every job is open to women - and both sexes live together and fight together.

On the first day that Capt Ashley Collette and her platoon of 60 men were deployed in the remote town of Nakhonay, near Kandahar, they came under attack.

"I don't think that the enemy liked our presence," she says with a soldier's understatement. "It's kind of in the middle of where they want to be."

That first day set the pattern for the next few months. Twice a day, Six Platoon - part of Bravo Company in the First Battalion of the Royal Canadian Regiment - endured enemy fire, both on patrol and directly on the camp. It was so regular that the soldiers nicknamed it "contact o'clock".

But Collette says being shot at made a sort of sense to her troops - they could see the bullets lighting up the sky and mountains as they came towards them. It was the IEDs (improvised explosive devices) and - towards the end of their rotation - suicide bombs, that wore on their nerves.

On 21 June, Sgt Jimmy MacNeil, an engineer attached to the platoon, was killed by a bomb while on a foot patrol. He was a kind, popular soldier, and a close friend of Collette's. The hours following his death were frantically busy and it wasn't till later in the day that she got a chance to reflect. Then she went and sat by herself on a sandbank in the camp.

"We still had six months to go," she says. "I remember thinking 'How am I, one, going to hold it together myself, and two, going to hold together this group of 60 people who are devastated by this event?'"

Then, two of her men came and sat next to her, one on either side. Neither said anything - and she knew that she didn't need to say anything, that they understood how she felt.

Collette did hold it together. After returning from her tour, she was awarded the Medal of Military Valour, one of Canada's highest military honours, for her leadership in Afghanistan. (She is keen to attribute the accolade to the work of her whole platoon.)

Around 12% of soldiers serving in the Canadian army are women and they have been integrated into combat positions since 1989.

The US and Brazil are currently in the process of working out the best way to place women in combat roles. The UK, which has not yet taken this step, will review its policy in the next five years.

Those who argue against putting women into combat sometimes say that a woman would not be able to carry a wounded fellow from the battlefield. Collette says she was tested every year in "soldier carry" and "soldier drag" exercises. Although she was paired with someone of a similar weight to herself, lifting bigger people using the "fireman's carry" is not as hard as you might think when you know how.

A priority in any infantry unit is to develop team cohesion. The traditional way to do this is to train, eat and sleep as a unit. But when Canadian female soldiers were first placed on the front line, they were segregated from the men.

It didn't work. Now they are mixed in together, and sleep in the same dorm.

Image caption The soldiers constructed a raised platform to give themselves more space

This does present some logistical challenges, but Collette took pains to be modest. While the men slept in boxer shorts, she would wear pyjamas. While training in Canada, she would climb into a cupboard to change, or pull her sleeping bag around her and change underneath.

Women in the Canadian Armed Forces Women have served in combat positions since 1989 (since 2000 on submarines)

Today, 2.4% of combat soldiers in the regular army are women

Wendy Clay was the first woman officer cadet in the Canadian Navy, the first female medical officer in the armed forces, the first woman to get her pilot wings (in 1974). In 1994 she became the first female Maj Gen and Surgeon General

On 17 May 2006, Capt Nichola Goddard became the first female soldier to die in combat, in Panjwaii district

There is no bar to women serving in the elite Joint Task Force 2 unit Source: Canadian Armed Forces

"Normally this would be a successful endeavour," she says wryly, before going on to describe a sleeping bag malfunction in which somehow the thing slipped from her grasp and she was left standing in electric blue knickers and bra. Someone shouted "Look at Ashley!" and all the men turned to laugh.

"I laugh with them because what can you do? I pull the sleeping bag up and change my clothes and everyone carries on, because you have way bigger things to worry about."

In Afghanistan, she shared a room roughly 3m x 4.5m (10ft by 15ft) with up to 10 people. But if anybody needed privacy they would just ask for it.

When you share a small space with a group of men for a length of time, they become like your brothers, she says. When men from other units came to her platoon and made the mistake of commenting on her appearance, her own soldiers cut them down.

"Soldiers from my platoon would look at those attachment soldiers and say, 'That's really irrelevant in this scenario. Keep your comments to yourself - that's our platoon commander.'"

Where do women fight? Canada, Denmark, Finland, Germany, New Zealand, Norway, Poland, Romania, Spain, and Sweden all permit women in all combat units

France, Israel, and the Netherlands permit women in combat positions but they are barred from some units

The US and Brazil are currently looking at how to include women in combat positions, and Australia is already phasing them in

Many other countries including the UK send women to the front line in non-combat roles, or permit women to be fighter pilots Source: UK Ministry of Defence, Australian Government

After her return from Afghanistan, some of her men approached her with a confession.

"They said, 'In the beginning we were wary of you, but now we would follow you anywhere,'" she says. But then, she believes it's natural for soldiers to be wary of a new commander, regardless of the gender. "They always want to feel out your style of leadership."

She describes her own style as compassionate - "I believe in second chances" - and perhaps a little more democratic than some, prepared to listen even to the lowest ranks. But she quickly adds that she is authoritative when she needs to be.

A particular concern to her before her rotation was how she would be received by the Afghan village community - whether her sex would prevent her from establishing vital links with local leaders.

"I thought that they wouldn't even listen to me, I thought that they would poke fun at me," she says. "But they didn't care at all." And this was in Panjwaii district, the Taliban's birthplace.

Throughout October the BBC's 100 Women season is attempting to find out what life is like for women today - and what might happen next. We're planning a unique global event on Friday 25 October. Join in the conversation and tell us what you think on Twitter using #100Women. Full coverage: BBC 100 Women

She was very popular with the village children, especially the girls, who would run after her with gifts of jewellery - but Collette says this was because she was kind, not because she was a woman.

Although the village chiefs accepted the fact of Collette's gender, their wives were incredulous. After she had been in Nakhonay for about a month she was summoned to have tea with them and was quizzed about everything from what she liked best about Afghanistan to when she was going to settle down with a nice Muslim boy.

The occasion was made even more surreal by the fact that her interpreter was not permitted in the room because he was male. Consequently, they were forced to make small talk at the top of their voices, so they could be heard through the walls.

Since her deployment, Collette has married and is currently taking a break from active service to complete an MA in social work. But she has every intention of returning to uniform, as a mental health specialist.

She is passionate that people see her as a soldier, rather than a "woman soldier" and describes the whole debate about whether women can handle a combat job as "null and void".

"In my experience," she says, "there's no reason why a band of brothers cannot be a band of brothers and sisters."

Capt Ashley Collette was interviewed in Women on the Front Line on the BBC World Service. Read more features from the 100 Women season.

Follow @BBCNewsMagazine on Twitter and on Facebook