KABUL — The women’s prison compound here has a busy, near-normal air. Infants wail, children recite lessons and inmates wearing dresses and headscarves vacuum their dorms in yellow prefabricated huts. Many are mothers, and children from newborns to 5-year-olds are allowed to live with them.

One prisoner sits alone on a bench, staring glumly at the scene. She is serving an 18-year sentence for beating her 5-year-old son to death and committing adultery. Her two older children have been taken away from her, and her family has shunned her for bringing shame on them.

Brishna, 24, a house cleaner and laundress who uses one name, says she is innocent and that the boy was killed by an abusive male cousin who beat him, forced her to have sex and threatened to kill her if she told anyone. So, she says, she stayed silent and told the police her son had fallen from a roof. The cousin fled and was never prosecuted.

Today, hundreds of Afghan women, mostly poor and uneducated, are serving sentences for crimes such as prostitution or drug smuggling, but rarely for acts of serious violence. Often, experts and legal advocates say, they did not act alone, but at the behest of a man — a father, husband or lover who wielded emotional, sexual or economic power over them.

“How could I kill my own child, whom I gave my own milk?” Brishna said in a recent interview at the prison, weeping into a pink headscarf. Her lawyer interpreted for a reporter. When she tried to explain her situation in court, Brishna said, “nobody believed me. They said I was a bad mother and a murderer. But that man was cruel to me and the children. I was afraid of him.”

She stood abruptly, pulling up her flowered tunic to reveal faint strap and bite marks on her back. “Now you see,” she said.

In many countries, male intimidation is accepted as a legitimate mitigating defense argument by women who commit crimes. But Afghanistan is a deeply traditional, male-dominated Islamic society where most women are allowed little independence, often married as teenagers to older men and expected to submit to husbands and in-laws.

Court decisions here reflect cultural norms as well as the law, and most judges and prosecutors are men. Women who flee abusive husbands are often sent home or put in jail-like shelters. Those who may be forced to participate in men’s crimes are often treated as accomplices with low morals rather than as victims.

But in recent years, several foreign organizations, particularly the New York-based International Legal Foundation, have trained scores of Afghan college graduates as defense lawyers and have provided free legal representation for defendants, like Brishna, who they believe have been treated unfairly by the judicial system.

Jennifer Smith, the foundation’s executive director, said that with few women in the Afghan justice system, “male police, prosecutors and judges do not have the life experiences to properly assess and judge these cases.”

Brishna’s lawyer is Samira Ishaqzai, 27, a polite but determined woman on the ILF staff here who has gone to great lengths to try to prove that Brishna was wrongly convicted. Brishna claims that she took her gravely injured son to a hospital for treatment but that the medical staff sent her away and he died on the way home. When Ishaqzai went to the hospital to investigate, she said, nobody recalled such a visit and security camera footage from that week had been erased.

“I think the doctors lied because they were afraid of being blamed as negligent,” she said this month. Ishaqzai filed two appeals, but Brishna’s conviction was upheld both times, most recently in March by the Supreme Court. She has remained in prison since her arrest one year ago.

Brishna’s history is fraught with risky choices and worse consequences. At 17, she eloped with a married man who later left to work in Turkey, where, she was told last year, he was jailed for drug smuggling. Alone with three small children, she moved in with relatives including the cousin, who prosecutors said became her lover.

The lower court, in a brief handwritten ruling, found her guilty of committing illicit sex, known as “zina” in Islamic law, and of being an “accomplice” to the boy’s fatal beating. The Supreme Court issued a lengthy, thorough ruling that took numerous conflicting statements and versions into account and concluded that Brishna had willingly “conspired” with her alleged lover to kill the boy and “paved the way” for him to escape arrest. 

“Even now she does not want to reveal the truth,” the ruling said. 

Ishaqzai and ILF officials, though, suggest that the moral taint of alleged adultery, compounded by horror at the idea of a mother killing her own child, inclined the courts to discount Brishna’s claims of innocence. Ishaqzai said that no sympathetic witnesses or testimony were presented on her behalf and that her mother-in-law told prosecutors she deserved to be hanged.

The judges who convicted her in both lower courts were all men, although the high court panel included one woman. There was also one female prosecutor, Jamila Khairkhwa, who expressed some sympathy for women facing criminal charges but said she was “shocked” at the unusually brutal nature of Brishna’s alleged crime and was convinced that she had “chosen” to have illegal sex and then lied to protect her lover and herself. 

“I feel sadder for women defendants than for men. But if she was innocent, if she or her children were being beaten, why did she stay silent?” Khairkhwa said in a recent interview. “Why did she not go to her neighbors, to the police, to anyone? Adultery is a small crime and murder is a big one, but it was adultery that made her keep silent, and that put her hand in the murder.”

Ishaqzai was in the room as Khairkhwa spoke. She had agreed to introduce a reporter to her adversary in the case. The meeting in a district prosecutor’s office was awkward for a moment, but the two women soon began chatting cordially and agreed about the extra difficulties faced by Afghan women who find themselves in serious legal trouble.

They also agreed that both of their own public roles as professional women in the Afghan legal system are uneasy and fraught with danger.

Khairkhwa’s office in Kabul is heavily barricaded against suicide attacks by the Taliban, which often targets government facilities and threatens women working in official posts. Ishaqzai’s longtime boss at ILF, Shabir Kamawal, was shot dead in Kabul two weeks ago by unknown gunmen who followed his car on motorcycles and fled. He bled to death as his driver sped to the hospital, and the office car is riddled with bullet holes.

“We are all still scared,” Ishaqzai said recently when her office reopened after a period of mourning. “People threaten defense lawyers, and they threaten prosecutors, too. We are trying to create justice, but many people want revenge. We are educated women, but there are still very few of us in the system.”

Brishna, she said, is an “illiterate woman who has been rejected by her family and society. Without us, she would have no one.”