BEIRUT, Lebanon — Bethany Vierra didn’t think she was asking for much.

First, she wanted a divorce from a husband whom she described as abusive. Then she wanted to secure custody of her 4-year-old daughter, Zeina. Then she wanted a court order to receive child support from her ex-husband, a businessman.

But as an American woman living in Saudi Arabia, Ms. Vierra has navigated a punishing legal maze ever since she first asked her Saudi ex-husband for a divorce in 2017, then opened custody proceedings last November.

Though she succeeded with the divorce, her custody battle appeared to dead end on Sunday, when a Saudi judge awarded custody of Zeina to her father’s mother, who lives with him, despite video evidence Ms. Vierra submitted to the court that she said showed her ex-husband doing drugs and verbally abusing her in front of their daughter.

“It’s like 10,000 times worse here because so much is at risk for women when they go to court,” Ms. Vierra said, near tears, in an interview on Sunday. “I genuinely thought that there would still be justice served here, and I kind of put everything on that.”