GANZHOU, China — Authorities released on bail three activists who were detained after investigating labor conditions at a factory that produced shoes for Ivanka Trump and other brands, it was announced Wednesday.

The three activists walked out of a police station in Ganzhou, a city in southeastern Jiangxi province on the final day of their legally mandated 30-day detention period limit.

They were working with China Labor Watch, a New York-based group, and were investigating Huajian Group factories in the southern Chinese cities of Ganzhou and Dongguan.

One of the activists, Hua Haifeng, carried his 3-year-old son in his arms as he walked out with his wife and other family members.

Activist Hua Haifeng carries his son Bobo as they leave a police station in Ganzhou, China. Gerry Shih / AP

"I will speak to everyone in a few days' time after we organize. I'm happy to be out. I just want to spend some time with my family," Hua told The Associated Press. "I appreciate the media following my case the last month but I'm not ready to speak yet."

Hua declined further comment but said he had not been mistreated. People released in politically sensitive cases tend to have conditions attached to their release that restrict them from speaking to the media.

China Labor Watch said the three men were released on bail pending trial. "China Labor Watch hopes that the court will provide the investigators with a fair trial," the group said in a statement.

Hua and his colleagues at the labor group were preparing to publish a report alleging low pay, excessive overtime, crude verbal abuse and possible misuse of student labor at Huajian Group factories.

The company has denied allegations of excessive overtime and low wages. It says it stopped producing Ivanka Trump shoes months ago.

The activists disappeared or were detained in late May. The labor group said two were taken away from a hotel room while the third was detained by customs officials in the southern city of Shenzhen while en route to Hong Kong.

The activists' detention prompted the U.S. State Department to call for their immediate release. At the time, Hua Chunying, spokeswoman for China's Ministry of Foreign Affairs, said the men had been accused of using secret recording devices to disrupt normal commercial operations and would be dealt with under Chinese law.

"Other nations have no right to interfere in our judicial sovereignty and independence," she said, adding, "the police found these people illegally possessed secret cameras, secret listening devices and other illegal monitoring devices."

Ivanka Trump Jacquelyn Martin / AP file

Ivanka Trump's brand has declined to comment on the allegations or the detentions. Marc Fisher, which produces shoes for Ivanka Trump and other brands, has said it is looking into the allegations. Ivanka Trump's lifestyle brand imports most of its merchandise from China, trade data show.

The detentions came as China has cracked down on perceived threats to the stability of its ruling Communist Party, particularly from sources with foreign ties such as China Labor Watch.

Faced with rising labor unrest and a slowing economy, Beijing has taken a stern approach to activism in southern China's manufacturing belt and to human rights advocates generally, sparking a wave of reports about disappearances, public confessions, forced repatriation and torture in custody.