HONG KONG — Two Malaysian women accused of pursuing a sexual relationship were caned in an Islamic court on Monday, setting off an outcry from rights groups that said the country’s political transformation this year had done little to ensure equal treatment of all citizens.

The women, who were convicted of “sexual relations between women,” were each struck six times with a rattan cane in front of witnesses in the Shariah High Court in the state of Terengganu, officials said.

The sentence, delivered four months after an election that saw Malaysia’s governing party ousted for the first time since the country was founded in 1957, reflects the country’s deeply conservative culture despite a liberalization in its politics.

Rights groups assailed the new government for discrimination against gay men and lesbians and for continuing to allow a form of corporal punishment outlawed in most of the world.