Immigrants' rights groups have condemned the US government after a transgender immigrant died in US custody while seeking asylum.

Roxana Hernandez, 33, was being held by immigration authorities in New Mexico when she fell ill.

She had travelled in a migrant caravan disparaged by President Donald Trump.

In a statement, US immigration authorities said all detained immigrants received comprehensive medical care.

Friends say Ms Hernandez had fled violence, hate and stigma in Central America.

"She saw in the United States the opportunity to start a new life free of abuse, risk and threats," said a statement issued by a coalition of immigrants' rights groups.

After applying for asylum at the US border, Ms Hernandez was detained for deportation, the Immigration and Customs Enforcement (ICE) agency said, citing previous convictions in Texas for theft, prostitution and illegally entering the country.

According to ICE, Ms Hernandez was "processed as an expedited removal" when she applied for admission at the San Ysidro port of entry in California on 9 May.

Six days later, on 15 May, she was transferred to the Cibola County Correctional Center in Milan, New Mexico.

Two days after that, on 17 May, she was admitted to Cibola General Hospital "with symptoms of pneumonia, dehydration and complications associated with HIV".

She died early in the morning of 25 May having been transferred to Lovelace Medical Center in Albuquerque by air ambulance.

The preliminary cause of death was given as "cardiac arrest." A post-mortem examination is to be carried out.

"Roxy died due to medical negligence by US immigration authorities," said the three immigrant groups - Pueblo Sin Fronteras, Al Otro Lado and Diversidad Sin Fronteras - adding: "In other words, she was murdered."

The campaigners released a statement from a fellow detainee, who wanted to be known only as Stacy, alleging that her friend had fallen ill when she was locked up for five days in a notoriously cold holding cell, known as an ice box.

Stacy claimed that Ms Hernandez was refused access to a doctor despite coughing, vomiting and suffering from diarrhoea and severe pain all over her body.

"The ICE officials yelled at her" because she was sick, Stacy was quoted as saying. "She didn't get medical care until she arrived at Cibola."

According to the organisers, Ms Hernandez was one of at least 267 members of the migrant caravan, including 23 transgender people, who crossed the border into California to apply for asylum.

The immigrants' rights groups are calling for dignified and humane treatment for all asylum seekers, medical care sensitive to the needs of transgender people and those with HIV, and the closure of all immigration detention centres.

Stacy said she feared she would be next.

"Because of what happened, I feel bad and am afraid that the same could happen to me, since I have HIV," her statement concluded.

ICE said Ms Hernandez was the sixth detainee to die in its custody since 1 October 2017.

In a statement, the agency said "the appropriate" authorities had been notified about the death along with the consulate of Honduras in Houston, Texas, which would attempt to notify her next of kin.

It added: "Comprehensive medical care is provided from the moment detainees arrive and throughout the entirety of their stay.

"All ICE detainees receive medical, dental and mental health intake screening within 12 hours of arriving at each detention facility, a full health assessment within 14 days of entering ICE custody or arrival at a facility, and access to daily sick call and 24-hour emergency care.

"Pursuant to our commitment to the welfare of those in the agency's custody, ICE annually spends more than $250m on the spectrum of healthcare services provided to detainees."

Earlier this month, a 20-year-old indigenous Guatemalan woman, Gomez Gonzalez, was shot dead in Texas by a US border patrol officer who said a group of migrants rushed towards him.