The Quran recounts to us the story of the pious woman who, while pregnant, vowed to dedicate the coming child to the service of God. She had been expecting a son (who could serve in the Temple at Jerusalem), but went on to deliver a daughter. It is at this time that she (or God, according to a different reading) remarks, “The male is not like the female.” The statement is not clear-cut in indicating overall preference for either one of the genders.

Language-wise, there are three possibilities, and each of these views is a position held among Muslim scholars:

to indicate preference for the male, i.e. the male is not like the female, he has the advantage of being able to serve in the temple (under Jewish ritual law) without the monthly menstrual interruption [Mawardi, and many other scholars of exegesis]

to indicate preference for the female, i.e. the male I wanted is not like the female God gave me; God’s choice is necessarily better [Zamakhshari, Abu Hayyan; two prominent exegetes, both of whom are heavyweights in the Arabic language]

to not imply any preference either way (simply that they are different), like red is not like green, nor is green like red. [Ibn Hazm]

Even if one takes the first or second interpretation, it is still contextual, and cannot be a proof-text for overall superiority of one gender, because:

According to (i) the male is better in the specific aspect of being able to serve in the temple, but this does not rule out that the female might intrinsically be better in other respects (see my earlier post that discusses Quran, 4:34)

According to (ii), the female in this specific case (the Virgin Mary) is better than the male that her mother had hoped for. It does not rule out that there might be other scenarios (involving other people) where a particular male is better than a particular female.

From this post, along with the preceding three (123), it is clear that the Quran does not teach intrinsic superiority of either of the two genders. Certainly, an ordinary believing man cannot claim superiority over the prophetesses and spiritual heavyweights like Mary and Fatimah. Rather, the criterion is piety: “Indeed, the most noble of you before God is the most pious.” And believing men and women are expected to support, protect and help one another – not to deride nor to oppress one another (despite what too often happens in some Muslim societies).