An undocumented 10-year-old girl with cerebral palsy detained by US immigration agents is confused why her mom can’t be by her side after undergoing emergency surgery.

Leticia Gonzalez, the attorney, says it’s been difficult explaining to RosaMaria Hernandez, who has the mentality of a 6-year-old, why she can’t go home.

Gonzalez says Hernandez can only FaceTime with her mom who’s in Laredo, Texas. The mother can’t visit her daughter because she’s also in the U.S. illegally and crossing a border checkpoint could put her at risk of being detained.

Hernandez was on her way to a Corpus Christi hospital for emergency gall bladder surgery when border patrol officials discovered her illegal status at a Laredo checkpoint and followed her to the hospital.

For nearly two days, agents waited outside her hospital room and on Wednesday they ordered her to be transported to a shelter in San Antonio where unaccompanied migrant children are detained.

Her attorney Leticia Gonzalez says she her file is being prioritized, but she could be detained up to three weeks during the proceeding.

Congressman Joaquin Castro criticized the process.

He released the following statement.

"A small child who just had surgery is not a threat to Texans’ safety or our national security."

Hernandez faces deportation proceedings in which a judge will decide if she can remain in the U.S or will be deported to Mexico.