Google, Microsoft, and Yahoo have agreed to block ads for services that determine the sex of unborn children in India, adhering to an order from the country's highest court. As the BBC reports, India's health ministry told the Supreme Court on Monday that the three web companies will block 22 keywords related to prenatal sex testing. The court was hearing a case that seeks to block online content that promotes prenatal sex-selection services, which were outlawed in 1994.

India has one of the worst gender imbalances in the world, with 914 females born for every 1,000 males, according to a 2011 nationwide census. The 1994 law aimed to ban sex-determination and sex-selective abortions, but unborn girls are still secretly aborted in regions where sons are seen as preferable. A 2015 UN report found that the legislation "has had little effect" on the country's male-female ratio, noting that boys tend to receive better healthcare and education. Some families prefer boys because they are seen as more likely breadwinners, and because they will carry on the family name.

"You have to abide by the law."

In July, India's Supreme Court ordered Google, Microsoft, and Yahoo to stop displaying ads for sex discrimination kits, tools, and clinics, which Justice Dipak Misra described as a "social evil." At the time, the companies said that blocking keywords associated with such services would be technically infeasible, arguing that filters would block related content such as research papers and news articles; but the justices dismissed their argument, accusing the companies of "patently violating Indian law."

"You have to abide by the law," Justice Misra said in July. "You can't say that you are not technically equipped. If you say you are, get out of the market." The petition to block the ads was brought by Dr. Sabu George, who the BBC described in 2015 as "India's leading activist against female foeticide."

Google tells Bloomberg that it will disable auto-complete predictions for searches related to prenatal sex selection services, and that it will display warnings to inform users that such services are illegal in India. Yahoo declined to provide comment to Bloomberg, and Microsoft did not respond to the news agency's request.