Haitian migrants have been released from crowded jails in Arizona and California as officials struggle to keep up with the number of those trying to enter the US illegally from Mexico.

They have been released on the condition that they agree to return to immigration court on a decided date and are allowed to live in society monitored by ankle tags until then.

An unnamed official said the immigrants are vetted before release to check for dangerous criminal backgrounds or other threats.

It comes after a surge in the number of Haitians attempting to enter the US this year.

Scroll down for video

Undocumented Haitian immigrants are being released from US detention centers after entering the country from Mexico because of jail overcrowding. Above, Haitian and African workers line up at a Mexican migration office in October

The Associated Press reports that 5,000 Haitians arrived at San Ysidro, one of California's busiest border crossings, between October 15 and late September this year.

It boosted the illegal immigrant population in jails from 34,000 to 41,000 alongside a surge in other nationalities trying to gain access to the country.

To combat the higher numbers, prison officials have been releasing non-threatening Haitians into the community.

They are released on the condition that they promise to appear at immigration court later to have their cases assessed.

It is a reversal on the government's recent vow to deport Haitian immigrants who have not faced being sent home for years.

President Obama halted automatic deportation for Haitians after the country suffered a devastating earthquake in 2010, claiming it would put their lives at risk to send them back to their shattered homeland.

In September, his administration vowed to resume flights for undocumented workers in response to the growing numbers.

Homeland secretary Jeh Johnson said conditions had improved 'sufficiently' to return them to Haiti.

ICE spokeswoman Jennifer Elzea said in a written statement it is removing Haitians in accordance with its enforcement priorities.

'ICE prioritizes the removal of national security threats, convicted felons, individuals convicted of significant or multiple misdemeanors, and individuals apprehended at or between ports of entry while attempting to unlawfully enter the United States,' she wrote.

Haitian and African migrants are seen queuing up at a Mexican migration office while trying to seek asylum to the United States

Thousands more Haitians have entered the US this year than in previous years

Deportation for Haitian immigrants had been halted since 2010 as the country recovered from a devastating earthquake. In September, Obama's administration reversed the rule and resumed deportation flights. Above, a Guatemalan man holds a Haitian girl at a migrant shelter in Tijuana

The large numbers of Haitians arriving in California and Arizona, and Central Americans coming across in Texas have put a tremendous strain on the system.

Customs and Border Protection announced Thursday it was opening a new temporary processing center in an El Paso, Texas, suburb.

The facility in Tornillo, Texas, will be used to process families and minors and can hold up to 500 people. It will be up and running within a week.

The decision to release Haitians will likely add to the growing backlog of more than half-a-million cases already pending in immigration court. That backlog has effectively meant that immigrants routinely wait years for a judge to decide if they should be kicked out of the country.

At a bus station in Phoenix on Thursday, several Central American women said authorities released them on condition that they promise to appear in immigration court. Yarely Cobon of Guatemala was wearing an ankle monitor and was with her 4-year-old daughter.

Haitian migrant Antenol Galicien waits at San Ysidro in May trying to gain entry to the US

Cobon, 22, said she left Guatemala over three weeks ago and crossed the border in Texas. She turned herself in to the Border Patrol and was detained for about six days. Her family paid for a bus ticket to join them in Los Angeles, where she has a court hearing next week.

Cobon said the Border Patrol holding cell where she was held with her daughter was packed with women in children. She called it a 'hielero' - a Spanish term for 'freezer' that migrants use to describe the extremely cold holding cells.

'I was just standing, sitting, desperate. There's children crying. It was dirty,' Cobon said.

Ana Lidia Dubon Martinez is nearly eight months pregnant with twins and left Honduras with her 11-year-old brother almost a month ago. The pair swam across the river in Matamoros, Mexico, and turned themselves in to border agents in the U.S.

Dubon Martinez is headed to Los Angeles via bus.

The U.S. policy shift announced in September lifted special protections that Haitians got after their country's 2010 earthquake and treats them like immigrants from other countries and regions, including Mexico and Central America.

Central Americans, particularly adult men, are often detained until they can be flown home. Mexicans are typically turned around immediately, made possible by their country's shared border with the U.S.