Qatar’s prime minister has vowed legal action against officials responsible for strip-searches of numerous women at a Doha airport earlier this month that drew international criticism. The searches, which followed the discovery of an abandoned baby in a terminal bathroom, also triggered strike threats that would have imperiled state carrier Qatar Airways’ flights to and from Australia.

In a statement issued Friday, the Qatari government’s communications office said that “those responsible for these violations and illegal actions have been referred to the Public Prosecution Office.” In a separate statement on Twitter, Qatari Prime Minister Sheikh Khalid bin Khalifa al-Thani said the searches were “unacceptable” and vowed to “hold those responsible for these acts to account.”

Qatari officials had previously said they regret “any distress or infringement on the personal freedoms of any traveler caused by this action.”

On Sunday, Australian broadcaster 7 News first reported that Qatari authorities had asked women on an Oct. 2 Sydney-bound Qatar Airways flight to disembark amid preparations for departure at Qatar’s main airport, Hamad International, and said they were then strip-searched in nearby ambulances.

Australian officials clarified Wednesday that women from nine other flights were also searched, including at least 18 Australians. Citizens of numerous countries were affected, and officials in Canberra said they are in contact with authorities in other nations on the issue.

Speaking to the Australian Broadcasting Corp., two Australian women said the procedure was involuntary and that the reasons for it were not made clear.

One of the women said a staff member told her that she “needed to examine my vagina,” according to the ABC.

The Oct. 2 searches sparked international outrage, including in Australia, where Prime Minister Scott Morrison called them “appalling,” and Foreign Minister Marise Payne said they constituted a “grossly disturbing, offensive, concerning set of events.”

“It is not something I have ever heard of occurring in my life, in any context,” Payne said on Monday.

Her ministry — which was informed about the incident earlier this month — issued a complaint to Qatar.

In its statement Friday, the Qatari government said protocols at the airport are being reviewed, adding that “this incident is the first of its kind.”

“What took place is wholly inconsistent with Qatar’s culture and values,” the statement continued.

In its initial response, Hamad International Airport said the searches were carried out because of concern “about the health and welfare of a mother who had just given birth.”

But in a follow-up statement Wednesday, the Qatari government’s communications office said the baby was found in a plastic bag and that it “appeared to be a shocking and appalling attempt to kill her,” according to Reuters.

The baby is under care in Qatar, officials said, and the mother’s identity remains unknown.

In Qatar, sex between unmarried people is illegal, according to a law that largely targets women and marginalized migrant workers, which sometimes leads to secret pregnancies, Deutsche Welle reported. Until saying it would abandon the practice five years ago in the face of criticism from international labor groups, Qatar Airways would fire women who became pregnant in their first five years of employment.

This report has been updated.