Cambodia has released 32 women who were detained while pregnant on charges of human trafficking for acting as surrogate mothers for Chinese couples, a government official said on Thursday.

The women, who were detained in July, were freed on bail this week after promising to raise the children themselves, said Chou Bun Eng, secretary of state for the Ministry of Interior, Reuters.com reported.

Police have said each woman was promised $10,000 for carrying a baby for Chinese clients.

The women were discovered during police raids at two apartments in the capital, Phnom Penh, in June. They were charged in July with cross-border human trafficking.

Five other Cambodians and one a Chinese national were also charged for involvement in the surrogacy ring, police said.

Members of the Agape International Missions (AIM), a Christian anti-human trafficking charity, accompanied police on the raid, AIM said in a July statement.

The women were initially provided accommodation by AIM and given meals, medical care, and counseling, the group said.

AIM said it continued to provide assistance after the women were arrested and transferred to a police hospital.

Cambodia is 97 percent Buddhist, with Christians accounting for less than 1 percent of the population.

An AIM staff member said the charity continues to provide assistance to the women, but declined to comment further.

Cambodia was a popular international destination for couples looking to have babies through commercial surrogacy but the practice was made illegal in 2016.

Since then, Cambodia has been cracking down on surrogacy.

In 2017, an Australian nurse and two Cambodian assistants were found guilty of running an illegal commercial surrogacy clinic. She was released earlier this year, according to local media reports.

Neighboring Thailand has also banned surrogacy and much of the business has shifted to Laos, where dozens of fertility clinics have appeared during the past few years.