Facebook disclosed the chats of a mother and her minor daughter to the Nebraska Police, who were investigating an alleged illegal abortion, United States court documents showed.

The investigation was launched in April, before the US Supreme Court in June overturned the Roe vs Wade ruling that protected the right to abortion. Abortion rights advocates have warned that once pregnancy termination becomes illegal in many states, instances of Facebook or other apps disclosing chats could become more common.

In this case, a 41-year-old woman has been accused of procuring and administering abortion pills to her 17-year-old daughter and then burying the foetus, NBC News reported.

According to an affidavit from Detective Ben McBride of the Norfolk Police Investigations Unit, the police started the investigation based on a tip from the friend of the 17-year-old girl. The friend claimed that she saw the girl take the first pill in April.

Under a Nebraska law, which was enacted before Roe vs Wade was overturned, a woman cannot abort after 20 weeks of pregnancy. McBride alleged that the 17-year-old girl had a miscarriage when she was around 23 weeks pregnant.

The detective applied for a warrant to access the digital presence of the mother and the daughter. He seized six phones and seven laptops and requested Facebook to disclose their chats.

The chats, which were seen by NBC News, show a user telling another about “What i ordered last month” and instructing her to take two pills 24 hours apart.

Facebook Messenger offers end-to-end encryption, which means that chats between two users are not readable by the social media platform or government authority. However, the option is only activated once a user marks the chats as “secret”.

Otherwise, Facebook stores user information as plaintext on its servers and can access it if a warrant is produced. The social media platform told AFP that it complies with government requests according to the law.

Facebook owner Meta defended itself Tuesday by saying that the Nebraska court order did not mention abortion at all and that the case came before Roe vs Wade was overturned, NBC reported.

“The warrants concerned charges related to a criminal investigation and court documents indicate that police at the time were investigating the case of a stillborn baby who was burned and buried, not a decision to have an abortion,” the company said.

It added, “Both of these warrants were originally accompanied by non-disclosure orders, which prevented us from sharing any information about them. The orders have now been lifted.”