SEOUL, South Korea — Just last fall, it seemed that Japan was starting to shake off its legacy as a country with a poor record of putting women in political power. In the space of less than two months, three women had assumed high-ranking posts, poking a few more holes in the glass ceiling.

But in the space of two days this week, two of those women resigned their positions, inevitably raising questions about the challenges to female leadership in a country where Prime Minister Shinzo Abe has repeatedly talked of creating a society in which “women can shine.”

On Thursday, Renho Murata, the first woman to lead the opposition Democratic Party, stepped down in the wake of a crushing defeat in local Tokyo elections this month. And on Friday, Tomomi Inada, the embattled defense minister, resigned to take responsibility for a controversy about the dangers faced by Japanese soldiers in a United Nations peacekeeping mission in South Sudan.

Both women stepped down for reasons that had little to do with gender. Yet in a country that scores abysmally in global measures of gender equality and has experienced false hopes of change in the past, these women’s departures are seen as a setback.