Image copyright Family handout

US Border Patrol's arrest of a 10-year-old Mexican girl with cerebral palsy as she was on her way to hospital for emergency surgery has provoked outcry.

Texas immigration agents stopped an ambulance carrying Rosa Maria Hernandez for gall bladder surgery at 02:00 local time on Tuesday.

The armed officers waited near her bedside and detained her when she awoke, family members told US media.

Rosa Maria is now being held at an immigration centre for young migrants.

She was brought to the US illegally by her family when she was three months old, and had been living in Laredo, Texas, near the border with Mexico, according to her mother.

When she was apprehended, the girl was being transported from a medical facility in Laredo to a children's hospital in Corpus Christi for an operation.

Media playback is unsupported on your device Media caption Where do America's undocumented immigrants live?

The ambulance was stopped at a Border Patrol "interior checkpoint" - a check station set back many miles from the US southern border - where agents reportedly allowed her to continue on to the hospital under police supervision.

Her cousin, who was travelling with her, told activists working on her legal case that agents tried to pressure the family to sign documents in order to transfer Rosamaria to a hospital in Mexico, but she refused.

The entire time Rosa Maria was in hospital, armed Border Patrol agents waited outside her hospital room, the US citizen cousin, Aurora Cantu, told US media.

After she awoke, she was transferred to a detention centre in San Antonio, Texas, for undocumented migrant children who arrive in the US unaccompanied by an adult.

Media playback is unsupported on your device Media caption 'Trump is deporting our parents'

Her mother, Felipa de la Cruz, 39, told the New York Times she had brought the girl to the US seeking better treatment for Rosamaria's cerebral palsy - a neurological disorder that affects body movements.

The family could not afford treatment in Mexico, she said, adding that she hoped Texas would help pay for her daughter's medical care.

"I'm a mother," said Ms de la Cruz, who also is undocumented. "All I wanted was for her to get the surgery that she needed.

"It never crossed my mind that any of what is happening right now could happen. When you're a mother, all you care about is your child."

A lawyer for the family says that Rosa Maria wept as she spoke to her mother over the phone on Thursday.

Media playback is unsupported on your device Media caption A routine night patrol for Pinal County police in Arizona turns into a man hunt

"'Mom, where are you? I miss you. Why aren't you here?" the girl said to her mother, before they both broke down in tears, according to the attorney, Alex Galvez.

Mr Galvez told Time magazine: "She said, 'Don't worry. We're going to see each other soon. Everything's going to be fine. Hang in there.'

"She was trying to make her smile."

He said that because the mother also has no legal status in the US, she does not want to visit Rosa Maria at the jail 150 miles (240km) away in case she is herself detained and deported.

For that same reason Ms de la Cruz did not get in the ambulance with her daughter on the night of the arrest, said the lawyer.