Genetic equality between males and females is established by chromosome-wide dosage-compensation mechanisms. In the fruitfly Drosophila melanogaster, the dosage-compensation complex promotes twofold hypertranscription of the single male X-chromosome and is silenced in females by inhibition of the translation of msl2, which codes for the limiting component of the dosage-compensation complex. The female-specific protein Sex-lethal (Sxl) recruits Upstream-of-N-ras (Unr) to the 3' untranslated region of msl2 messenger RNA, preventing the engagement of the small ribosomal subunit. Here we report the 2.8 Å crystal structure, NMR and small-angle X-ray and neutron scattering data of the ternary Sxl-Unr-msl2 ribonucleoprotein complex featuring unprecedented intertwined interactions of two Sxl RNA recognition motifs, a Unr cold-shock domain and RNA. Cooperative complex formation is associated with a 1,000-fold increase of RNA binding affinity for the Unr cold-shock domain and involves novel ternary interactions, as well as non-canonical RNA contacts by the α1 helix of Sxl RNA recognition motif 1. Our results suggest that repression of dosage compensation, necessary for female viability, is triggered by specific, cooperative molecular interactions that lock a ribonucleoprotein switch to regulate translation. The structure serves as a paradigm for how a combination of general and widespread RNA binding domains expands the code for specific single-stranded RNA recognition in the regulation of gene expression.