For decades, Indian parents have been using pre-birth sex determination to abort their unborn girls. The country’s courts are doing what they can to put an end to the practice—and that means going after Silicon Valley.

Earlier this year, the Indian supreme court warned the three online search giants—Google, Yahoo, Microsoft—against abetting the violation of the country’s ban on prenatal gender testing and sex selective abortion. In a bid to save India’s female babies, the court instructed the tech companies to stop publishing ads promoting sex discrimination kits, tools, and clinics. The three companies had argued that blocking keywords pertaining to these ads would also block other unrelated sites and scholarly material. Justice Dipak Mishra, the judge on the case, replied stoically in court: “You can’t say that you are not technically equipped. If you say you are, get out of the market.”

But now, all three companies appear ready to comply with the court’s order, the India’s health ministry told the supreme court on Monday (Sept. 19). Despite the initial pushback, they have agreed to block 22 keywords relating to prenatal gender testing, according to Bloomberg. The companies did not immediately respond to Quartz but Google told Bloomberg that it is “disabling autocomplete predictions for relevant terms on its site and showing a warning that tells users prenatal gender screening or testing is illegal in India.”

Historically, boys have been favored in India because they are viewed as breadwinners whereas girls are seen as a burden—dependent on the men in their lives and required to provide dowry payments for marriage. India has one of the world’s most skewed sex ratios—in each of the country’s 29 states, boys outnumbered girls during the 2011 census. Globally, a small gap exists—for instance, UK has around 960 females for every 1,000 males under seven years old—but most Indian states record far more dire results.

State Child sex ratio (females per 1,000 males) Haryana 834 Punjab 846 Jammu and Kashmir 862 Delhi 871 Chandigarh 880 Rajasthan 888 Uttarakhand 890 Gujarat 890 Maharashtra 894 Uttar Pradesh 902 Daman and Diu 904 Himachal Pradesh 909 Lakshadweep 911 Madhya Pradesh 918 Dadra and Nagar Haveli 926 Manipur 930 Bihar 935 Andhra Pradesh 939 Odisha 941 Goa 942 Tamil Nadu 943 Nagaland 943 Karnataka 948 Jharkhand 948 West Bengal 956 Tripura 957 Sikkim 957 Assam 962 Kerala 964 Puducherry 967 Andaman and Nicobar Islands 968 Chhattisgarh 969 Meghalaya 970 Mizoram 970 Arunachal Pradesh 972

As early as 1994, the Indian government passed laws against pre-birth gender discrimination with the Pre-Conception and Pre-Natal Diagnostic Techniques Act. And in 2003, the mandate was amended to ban practitioners from influencing the birth of an unborn child through techniques like sperm sorting.

However, the law has fallen short of halting the falling sex ratio, in part because of the rise of ultrasound technologies, which make it easier to identify the gender of a fetus. The situation has gone from bad to worse. In 1961, there were 976 girls for every 1,000 boys under the age of seven—by 2011, that number had dropped to 914. Despite the unlawfulness of gender screening, people have found workarounds for years.

The black market for sex determination is thriving. Six years ago, ”activists [estimated] that sex selection is a $100 million business in India. If you’re willing to pay, you can find out the sex of your baby. You just go to the right clinic. The ultrasound technician will respond in code. ‘Celebrate with sweets,’ he might say, meaning that a son is on the way,” the Boston Globe reported. Other clinics may hint it’s a girl by telling you “buy pink clothes.”

Indian law also prohibits advertisements for sex determination procedures or clinics offering them—the basis for the recent warnings issued to Google, Yahoo, and Microsoft. However, some medical practitioners are critical of that portion of the mandate: They argue that sex determination should be legal so doctors are able to identify which parents are looking to abort girl children and intervene.