Amina el-Filali, a moon-faced Moroccan peasant girl, seemed destined for an obscure life in this dreary little farming village 50 miles south of Tangier.

But that was before she was lured into sexual relations at age 15 by a 23-year-old unemployed laborer who took her into a shed next to the eucalyptus grove behind her house. That was before she was ushered into an early wedding, with the man who took her virginity, by a traditional Muslim family eager to salvage its honor. And that was before she swallowed rat poison to commit suicide rather than endure what she told her mother was an unbearable marriage.

Since Amina took her life shortly before lunch March 10, she has become a national cause, an icon for women’s groups, human rights organizations, progressive politicians and millions of ­Western-oriented Moroccans who have demanded changing a law that permits marriage at such a young age.

The law under attack is based on Islamic jurisprudence and tradition. As a result, the demands for change present a particularly unwelcome challenge to Morocco’s new Islamist government, which was elected in November on a promise to make Morocco more Islamic — not less.

The quandary faced by Prime Minister Abdelilah Benkirane and his Justice and Development Party, Morocco’s main Islamist group, has high stakes for Morocco, which depends heavily on European tourism and thus on its reputation abroad.

But it is emblematic of tensions emerging in places such as Egypt, Tunisia and Libya, where Islamic groups rising to positions of power in the aftermath of the Arab Spring are beginning to confront pressures pitting principles imported from the West against their Islamic traditions.

“Little girls raped in their village — it happens all the time,” said Khadija Ryadi, head of the Moroccan Human Rights Association in Rabat, the capital, about 100 miles south of here. “But it was important this time, because everyone is waiting to see what the reaction of an Islamic government will be.”

The demands for change have arisen only eight years after a landmark modernization of the country’s family code, spearheaded by King Mohammed VI. That effort was widely hailed — by the United States, the United Nations, European governments and human rights groups — as a triumph for the then-newly crowned king and an example for the rest of the Arab world.

The family code, or mudawana, set 18 as the legal age for marriage for both sexes. But it also provided for exceptions to be decided by judges on the basis of special legal and social circumstances. In practice, the provision robbed the age limit of much of its meaning; the Justice Ministry estimates the number of such exceptions at about 35,000 a year.

Now the uproar set off by Amina’s case has led to an effervescent Internet reaction in Morocco, with loose allegations of rape and demands for immediate change, including a Facebook site named “We are all Amina” and a deluge of tweets repeating the slogan.

Anti-rape demonstrations have been staged in the largest cities, attended mainly by women. The U.N. office in Morocco declared that marriage laws should be modernized, and the left-wing Socialist Union of Popular Forces party has petitioned for a parliamentary investigation mandated to recommend amendments.

The parents’ account

Amina grew up in a cinder-block home, one of a few dozen scattered around the dirt lanes of Karmida. Her father, Lahsin el-Filali, 48, a farmhand who makes about $6 a day, took a second wife when Amina was 10. The family remained united, and she was close to her mother, Zohra, 44. Although she was behind several grades, Amina attended a local school and, according to her mother, dreamed of becoming an engineer.

Amina went to the shed by the eucalyptus grove only because the laborer, a neighbor named Mustapha el-Hallaq, forced her to, the mother said. “She was never his girlfriend,” she said. “If she went with him, it was because he would accost her on the way home from school. He would take her to the grove, and that’s where it happened.”

The parents discussed their daughter’s relationship with Hallaq in a lengthy interview at the family’s home, over heavily sugared mint tea, fried eggs and several loaves of bread.

Amina’s father described Hallaq as a local tough and said he had complained to the police about Hallaq’s advances toward Amina. When she revealed the sexual relations, he and Amina’s mother said, she told them that Hallaq had forced himself on her. “Rape” was the word they used.

Nevertheless, the parents met with Hallaq’s parents, and together they de­cided to go to a judge and ask for authorization for the young couple to marry, what Zohra described as a “compromise” between the families. Both sets of parents knew that in Moroccan tradition, particularly in the countryside, a later marriage to another man would have been impossible once it became known Amina was no longer a virgin. In addition, Hallaq was to pay a bride’s price of $625. According to Moroccan tradition, the amount was specified in the marriage contract. But Amina’s father said it was never paid.

“I did not want the marriage,” said the father, sitting with his first wife across the table and his second, seven years younger than Zohra and the mother of a boisterous 5-year-old daughter, a little to his left. “But Zohra said it was necessary for the honor of our family.”

Informed of the marriage plans, Amina instinctively resisted and then resigned herself, he said. “She said at first that she didn’t love him,” he said, “but then, as the procedure with the judges went on, she said, ‘Okay, he’ll be my husband.’ ”

The couple were formally married Dec. 12, and Amina moved in with Hallaq’s family nearby. Zohra said her daughter visited frequently and soon began to express her misery, citing beatings from Hallaq and unkind treatment from his family.

“I don’t know for sure what was happening, because she was at his house and I was at my house,” the mother said. “But she used to come here and complain that he was beating her. I told her that if that was so, she should go to the police and lodge a formal complaint. But she never did. She was afraid of him.”

(Hallaq was unable to provide his version of events; his mother said he was gone from Karmida. But he told a Moroccan journalist recently that the affair began with a phone call from Amina. He said that all the sexual relations were consensual and that he agreed to the marriage out of regard for Amina. As for the suicide, he said, his bride often seemed sick after her visits home, where, he said, her father would beat her.)

Even on the day Amina went to the market to buy rat poison, the mother said, witnesses saw Hallaq beating her along the way. She bought the poison and took it home in the late morning. She began vomiting after lunch and died in the hospital that afternoon, the parents said.

On the walls of their living room, decorated in gaudy plastic, hung studio photographs of Amina’s two elder sisters, Fatiha and Hamida, both beaming in their wedding dresses. Asked why Amina’s photo was not also displayed, the mother reached into a plastic bag and pulled out an ID-style head shot showing Amina with a strict Muslim covering over her hair and forehead. Another photo in the sack showed Hallaq on the day he married Amina, decked out in new clothes with a stylish scarf around his neck and standing alone in front of an idealized seaside scene painted on the wall.

The government’s stance

The Islamist government’s justice and liberties minister, Mustafa Ramid, and its family affairs minister, Bassima Hakkaoui, declined to be interviewed about Amina’s case. Earlier, however, Hakkaoui said a change in the early-marriage provisions, contained in Article 475 of the penal code, was not on her agenda.

“Article 475 is unlikely to be abrogated from one day to the next under pressure from international public opinion,” she told Moroccan journalists. “Sometimes marriage of the raped woman to her rapist does not bring real harm.”

Hisham Mellati, Ramid’s penal-law attache, said a police investigation, citing neighbors, showed that Amina and Hallaq had been sweethearts for months, stealing off frequently to the shelter of the eucalyptus trees. Mellati, fingering through a thick file at the Justice Ministry in Rabat, said that, on the basis of the investigation and Amina’s testimony, judges concluded that the sexual relations were consensual and that Amina was a willing partner in the marriage.

Much of the agitation surrounding Amina’s case, including its description as a rape, is thus ill-founded, he said.

According to Morocco’s penal law, Mellati said, rape with the use of violence is automatically prosecuted and is punishable by prison. Even if the sexual relations between a young girl and an older man are consensual, he said, there can be a crime classified as “leading a minor astray,” which is roughly parallel to statutory rape. But the degree to which Amina was pressured into the sexual relations was unclear, he said.

In any case, if there is no violence, judges can grant permission for early marriage despite the family code, he said, provided the families petition the court and follow a procedure that takes several months. In Amina’s case, he added, there were five sessions, including one in which the judge sat alone with Amina to ensure she was not being pressured to accept the marriage. “The law was strictly followed,” Mellati said.

The Justice Ministry has for some time been studying an overhaul of the entire penal code, which dates to 1962, Mellati said. When it comes time to consider Article 475, it will be judged according to the same criteria as other laws and amended “if Moroccan society wants it,” he added. In the meantime, he said, a police investigation is looking into what pushed Amina to commit suicide. It has as yet reached no conclusion.

Although the wave of protests has been directed at the Islamist government, Morocco’s monarch, regarded as a descendant of the prophet Muhammad, has retained the right to intervene. His role as ultimate arbiter of religious values gives him the power. Moreover, the controversy is tied to the family code, which was his signature initiative.

A new constitution, issued last year after demonstrations tied to the Arab Spring, was welcomed as an advance toward democracy because it committed the king to name a government from the party with the most votes. This put Islamists into the government, but the king kept defense, security and national religious affairs in his hands.

So far, in public at least, he has kept silent on Amina.