A migrant diagnosed as having a flesh-eating bacteria has been detained at the US-Mexico border.

The man was transported to a hospital in New Mexico after telling an agent that he had a growing rash on his leg.

Officials said in a statement Friday that the unidentified migrant will require extensive treatment.

Flesh-eating bacteria is a rare condition called 'necrotizing fasciitis' that spreads quickly and can be fatal.

The bacteria usually gets into the body through a minor cut or scrape and can cause a serious infection that can destroy muscle, skin and other tissue.

The man was detained near the small city of Lordsburg and it is thought he was detained at the border patrol station there

Migrants are pictured climbing a platform truck for a lift during their journey towards the United States, in Acayucan, Mexico on January 25

Sometimes surgery is needed to remove the infected area. It is rare for the infection to spread to other people. The man was detained near the small city of Lordsburg and it is thought he was detained at the border patrol station there.

The man’s home country was not disclosed. Meanwhile, officials say shelters in Mexico's northern border city of Tijuana are filled to overflowing with Central Americans fleeing poverty and violence.

They are also unable to cope with an expected influx of asylum seekers due to be dispatched to the city from the United States.

The policy dubbed the Migrant Protection Protocols first announced on December 20 by the administration of President Donald Trump will return non-Mexican migrants who cross the U.S. southern border back to wait in Mexico.

They will stay there indefinitely while their asylum requests are processed in U.S. immigration courts.

Mexican Foreign Ministry spokesman Roberto Velasco said the United States was to send the first group of 20 asylum seekers back to its territory later on Friday through Tijuana.

Asylum seekers have traditionally been granted the right to stay in the United States while their cases were decided by a U.S. immigration judge, but a backlog of more than 800,000 cases means the process can now take years.

Now, the U.S. government says migrants will be turned away with a 'notice to appear' in immigration court.

A family of migrants squeeze on a platform truck for a lift during their journey to Tijuana on January 25

Migrants walk on a highway during their journey towards the United States, in Acayucan, Mexico, January 25

El Barretal migrant shelter (pictured) in Tijuana is winding down operations ahead of its closure. Officials in the city say the are filled to capacity with Central American migrants

They will be able to enter the United States for their hearings but will have to live in Mexico in the interim. If they lose their cases, they will be deported to their home countries.

'Shelters are at capacity and we can't receive migrants that are being deported or (Mexican) nationals that are passing through the city.

'Let's hope this doesn't happen,' said Jose Maria Garcia, who runs the Juventud 2000 shelter in Tijuana.

The U.S. policy shift is aimed at curbing the increasing number of families arriving mostly from Central America who say they fear returning to their home countries due to threats of violence.

Donald Trump (right) signed off on a new order sending 20 Central American migrants daily back to Mexico to assess their application. The decision was criticized by Mexican Foreign Ministry spokesman Roberto Velasco

More than 100 Central American migrants tried to scale a border wall on Monday

The Trump administration says many of the claims are not valid.

The program will apply to arriving migrants who ask for asylum at ports of entry or who are caught crossing illegally and say they are afraid to return home.

Immigration advocates fear Mexico is not safe for migrants who are regularly kidnapped by criminal gangs and smugglers, and have raised concerns that applicants will not be able to access proper legal counsel to represent them in U.S. courts.

It is unclear how Mexico plans to house what could be thousands of asylum seekers for the lengthy duration of their immigration proceedings. Some Mexican border towns are more violent than the cities the Central Americans left behind.

'Asylum seekers from Central America are fleeing unspeakable violence and their journeys to the United States are dangerous and harrowing,' said Betsy Fisher, policy director for the International Refugee Assistance Project. 'For many of them, Mexico is not a safe place to stay."