The henna artist bent over her client’s hand, glancing at the smartphone to get the precise details of the pattern chosen by her customer, a young woman living in an ancient desert city in the West African nation of Mauritania.

Under a sliver of brightening moon, the young woman, Iselekhe Jeilaniy, sat gingerly on a mat, careful that the wet henna on her skin would not smudge, just as she had on the eve of her wedding day.

But she was not getting married. She was getting divorced. The next day would be her divorce party.

“Your attention, married ladies — my daughter Iselekhe is divorced now!” Ms. Jeilaniy’s mother called out to the townspeople, ululating three times and drumming on a plastic tray turned upside down. Then she added the traditional reassurance that the marriage had ended more or less amicably: “She’s alive, and so is her ex.”

Ms. Jeilaniy giggled, looking at her phone. She was busy posting henna pictures on Snapchat — the modern version of a divorce announcement.

Divorce in many cultures is seen as shameful and carries a deep stigma. But in Mauritania, it is not just normal, but even seen as a reason to celebrate and spread the word that the woman is available once more for marriage. For centuries, women have been coming together to eat, sing and dance at each others’ divorce parties. Now, the custom is being updated for the selfie generation, with inscribed cakes and social media montages, as well as the traditional food and music.

In this almost 100 percent Muslim country, divorce is frequent; many people have been through five to 10 marriages, and some as many as 20.

Some scholars say the country has the highest divorce rate in the world, though there is little reliable data from Mauritania, partly because divorce agreements there are often verbal, not documented.

Divorce in the country is so common, according to Nejwa El Kettab, a sociologist who studies women in Mauritanian society, partly because the majority Maure community inherited strong “matriarchal tendencies” from their Berber ancestors. Divorce parties were a way for the country’s nomadic communities to spread the word of a woman’s status. Compared with other Muslim countries, women in Mauritania are quite free, she said, and can even pursue what she called a “matrimonial career.”

“A young, divorced woman is not a problem,” Ms. El Kettab said, adding that divorced women were seen as experienced and hence desirable. “Divorce can even increase women’s value.”

As Ms. Jeilaniy carefully rearranged her melafha — a long cloth wrapped around her hair and body, its bright white chosen to highlight the dark henna — her mother, Salka Bilale, strode across the family courtyard and crossed her arms, posing for pictures destined for campaign posters.

Ms. Bilale had also divorced young, become a pharmacist and never remarried. Now, she was running to become the first ever female member of the national legislature for Ouadane, their hilltop town of a few thousand people living in simple stone houses abutting a 900-year-old ruined city.

Divorce was the reason Ms. Bilale could do any of this. She had been married young, before she could pursue her dream of becoming a doctor, and divorced when she said she realized her husband was seeing other women. Her former husband, who has since died, had wanted her back, but she refused, so he cut her off financially, initially giving her nothing, and then only $30 a month to raise their five children, she said.

In dire need of money, Ms. Bilale opened a store, and eventually made enough to put herself through school. Last year, a new hospital opened in Ouadane, and, in her early 60s, she finally got a job in the medical field.

Her daughters’ experience had been very different. Ms. Jeilaniy married much later, at 29, and 28-year-old Zaidouba had, so far, turned down all marriage offers she’d had, preferring to study and take on a series of internships.

Many women find that divorce affords them freedoms they never dreamed of before or during marriage, especially a first marriage. Mauritanians’ openness to divorce — which seems so modern — coexists with very traditional practices around first marriages. It is common for parents to choose the groom themselves and marry daughters off when they are still young — more than a third of girls are married by the time they are 18 — allowing the women little choice in their partners.

When another resident of Ouadane, Lakwailia Rweijil, got married for the first time as a teenager, her father held the wedding ceremony without her knowledge, informing her afterward.

It wasn’t long before she divorced that husband. But she has been married off again and again in the more than two decades since.

Ms. Rweijil had no choice over any of her six husbands, and as a result, she said: “I don’t put people deep in my heart. When they come, they come. When they leave, they leave.”

But she has been able to choose whom to divorce. Women can legally initiate divorce in Mauritania under certain circumstances, and although it is usually men who technically do so, it is often at the women’s insistence.

Women typically get priority over men for custody of any children after a divorce. Although men are legally responsible for paying for their children’s maintenance, there is little enforcement and women often end up bearing the financial burden.

Even though many women never plan to get divorced, if it happens, it is easier for them to move on than in many other countries, said Ms. El Kettab, the sociologist, because society supports instead of condemning them. “They make it so simple, it’s easier to turn the page,” she said.

And one of the ways a woman’s circle shows that support is through parties.

Ms. Jeilaniy said she had divorced because her husband was too jealous, sometimes even refusing to let her go out. She had to wait three months to finalize the divorce and have her divorce party, an interval that is required to ensure that the woman is not pregnant. If she is, the couple usually waits until the child’s birth.

On the day of her divorce party, Ms. Jeilaniy dabbed foundation on her cheeks and highlighted her dark eyebrows in gold, as she had learned from YouTube.

Wrapping herself in a melafha of deep indigo, she stepped out of the front door and set off for the party, hosted by a friend of her mother’s in the living room of her modest stone house.

The women dipped dates in canned cream. They scooped up camel meat and onions with hunks of bread. Then they ate handfuls of rice from a common platter, rolling them into balls in their palms as they talked. Small boys crouched and peered at the increasingly raucous party through the open windows, which in Ouadane are at the level of the sandy street.

More women arrived, and the singing began. Women who had known many divorces and attended many divorce parties sang of love, and then of the Prophet Muhammad — lilting, drifting, sometimes sorrowful desert music, accompanied only by drums and clapping.

Mauritania, a land of nomads, camels and empty moon-like landscapes, is sometimes called the land of a million poets. And even divorce is poetic.

“There is so much poetry about the seduction of divorced women,” said Elhadj Ould Brahim, a professor of cultural anthropology at Nouakchott University. This stands in sharp contrast, he pointed out, to much of the Muslim world, including Mauritania’s immediate neighbors like Morocco, where, he said, the social stigma is so strong that “it’s death for a woman to be divorced.”

Today’s divorce-themed poetry, Mr. Ould Brahim said, is more visual and is conveyed via social media.

“Snapchat is the new ululation,” he said.

The sisters’ mother arrived and plopped down on the carpet near Ms. Jeilaniy, who had spent much of her party on her phone, messaging and posting selfies. The party began to wind down.

Ms. Bilale looked at her elder daughter. “She’s only interested in marriage and men,” she said. “When I was her age, I was already interested in politics.”

Ms. Bilale got up from the carpet. If Ms. Jeilaniy wouldn’t use her status as a divorced woman to advance her career and build her independence, then Ms. Bilale would concentrate on using her own. She headed out the door toward the kitchen, where she had spied some potential voters for the upcoming election.

“I’m going to the young people to get votes,” she said.