A 3-year-old girl named Sofi was asked by a Border Patrol agent if she wanted to go with her mom, or her dad.

As NPR reported, an agent wanted to separate the girl's family, who came to the US from Honduras seeking asylum.

Under the Trump administration's "Remain in Mexico" policy, asylum seekers are being sent back to Mexico as their claims are processed.

Visit INSIDER's homepage for more stories.

It's the kind of question that no kid, let alone a 3-year-old, should ever have to answer: do you want to go with your mom, or your dad?

That's the exact situation that faced Sophia, who goes by Sofi for short, as a Border Patrol agent tried to rip apart her family. They are from Honduras and, while at a Border Patrol holding facility in El Paso, Texas, were told by an agent that while one parent and their three children could remain in the United States, the other parent would be sent to Mexico.

"The girl, because she is more attached to me, she said mom," Sofi's mother, Tania, told NPR through an interpreter. "But when they started to take [my husband] away, the girl started to cry. The officer said, 'You said [you want to go] with mom.' "

Running from a dangerous gang

As NPR previously reported, Tania, her husband Joseph, and their three children, including Sofi, came to the US seeking asylum, after Tania saw her mother shot nine times by MS-13 gang members, who then ran over her body with a motorcycle. Tania's sister-in-law, who also witnessed the brutal slaying, was killed, along with her infant daughter, after agreeing to testify in court about the murder.

Tania then found a note on her front door, by the gang, instructing her and her family to leave the house. The family was told they only had 45 minutes to flee.

Following an arduous journey north, with nights spent in shelters and threats from drug cartels mounting, the family finally made it to El Paso. Except, once in the US, they were told they had to go back.

People walk on the international border bridge Paso del Norte to cross to El Paso, Texas, from Ciudad Juarez, Mexico, December 28, 2016. REUTERS/Jose Luis Gonzalez

A policy that separates asylum-seeking families

Earlier this year, the Trump administration announced its Migration Protection Protocols, or the "Remain in Mexico" policy, which sends certain asylum seekers to Mexico as their claims are processed. The White House said the program would decrease the number of migrants living and working in the US while they wait for their day in immigration court, a process that can take years due to massive backlogs.

Despite legal challenges, the US Court of Appeals for the 9th Circuit ruled in May that the Trump administration could continue to, at least temporarily, run the program, reversing a lower court decision that had blocked it.

As of July 11, almost 20,000 asylum seekers have been returned to Mexico, according to Mexican government officials. The majority of those people, more than 9,000, were sent from El Paso to Ciudad Juárez, a city plagued by brutal drug cartels and where migrants can be easy targets.

Due to the "Remain in Mexico" policy, Sofi and her family were sent back to Juárez. But, as NPR noted, their attorney, Linda Rivas, executive director of the nonprofit organization Las Americas Immigrant Advocacy Center, tried to make the case that the family should be taken out of the Migrant Protection Protocols. She said it was because of Sofi's heart.

A heartbreaking choice

Migrants scramble across the Rio Bravo to surrender to the American authorities, on the US - Mexico border between Ciudad Juarez and El Paso, Saturday, June 15, 2019. AP Photo/ Photo/Christian Torres

Department of Homeland Security guidelines state that people with "known physical/mental health issues" are not supposed to be sent back to Mexico, according to NPR. And in court on Wednesday, Rivas explained to Judge Nathan Herbert how Sofi, just 3 years old, had previously experienced a heart attack.

A day later, a doctor on contract by DHS examined the young girl and told the Border Patrol agents her heart condition was serious. The doctor emphasized how critical it was for the family to stay together, but the agents responded they had to be separated. That's when they asked Sofi the heartbreaking question: mom, or dad?

"I was going to be separated from my children and my wife, and I would have to go back to Juárez on my own," Joseph told NPR through an interpreter. "I felt devastated."

On Friday, everything changed. The doctor returned and told another agent that the family needed to stick together. "He replied, yes, he was going to give him [Joseph] entrance. He also said they were giving us different court dates and the doctor told him, no, that we had entered as a family and that they had to give us the same date to all," Tania told NPR.

Later that day, the family was released to an El Paso migrant shelter and later flew to the Midwest to reunite with relatives.

Texas Democratic Rep. Veronica Escobar described Sofi's experience as an "outrage" in an interview with NPR.

"It's absolutely horrifying that a toddler would be asked to choose between two parents. It was just stunning to me," she said. "It's one thing to read about it; it's another thing to actually hear a parent recounting the story firsthand in their own voice."