KOTTE, Sri Lanka — Madhu Hettiarachchi has no time right now for the brain surgery her doctors have recommended. She’s busy trying to take advantage of an unprecedented chance to get women elected in Sri Lanka.

After more than a generation of struggle by women’s rights activists, Sri Lanka’s patriarchal political scheme has, reluctantly, opened up a bit to require that 25 percent of candidates in local elections be women. Their representation in this island nation, still reeling from a protracted civil war, remains at a miserable 2 percent of local government posts, though women make up more than 51 percent of registered voters.

When the country goes to the polls on Saturday, a quarter of the 56,000 candidates will be women. In the process of running, many have faced abuse that includes sexual assault, intimidation and character assassination. Religious leaders have openly urged their congregations not to vote for women. But for Ms. Hettiarachchi and other political activists, there is no going back.

“We have fought for this for two or three decades,” Ms. Hettiarachchi said, her eyes gleaming with excitement. “It’s not an easy thing. But this is a turning point.”