BANGKOK (AP) — Almost 100 Pakistani refugees have been freed from Bangkok’s overcrowded immigration prison in an initiative spearheaded by Thai human rights activists.

The Thai Committee for Refugees says the 96 members of Pakistan’s Ahmadiyya Muslim sect were freed on bail Monday in the first such large-scale release of detainees the authorities treat as illegal aliens.

A Thai police officer stands next to Pakistani refugees who walk in line to a waiting bus after they were released from the immigration detention center in Bangkok, Thailand Monday, June 6, 2011. Pic: AP.

The group negotiated the release with the state National Human Rights Commission and immigration officials.

The detainees, about a third of whom are children, were arrested last December even though all but two were granted official refugee status by the United Nations because they faced persecution in their homeland.

They will stay in Bangkok until they are resettled in a third country.