To Allâh belongs the kingdom of the heavens and the earth. He creates what He wills. He bestows female (offspring) upon whom He wills, and bestows male (offspring) upon whom He wills. Or He bestows both males and females, and He renders barren whom He wills. Verily, He is the All-Knower and is Able to do all things. (42:49-50)
In relation to the above ayahs, Wathilah ibn Aqsa states: Blessed is a woman who gives birth to a daughter first. (Qurtubi)