Three girls were detained by U.S. Customs and Border Protection at O’Hare International Airport more than 12 hours Thursday after returning from a trip abroad.

The girls — ages 13, 10 and 9 — are U.S. citizens and arrived in Chicago at 3 a.m. with an adult who had written permission from the parents to travel with the children, said Mony Ruiz-Velazco, an attorney working with the family said.

However, Border Protection officials denied entry to the girls as well as their companion, who was traveling on a tourist visa; officials said they were waiting for a parent to come get the girls.

Their parents, undocumented immigrants, had feared their children were being used as bait so that the parents could be detained by Immigration and Customs Enforcement.

After some negotiation, the girls were released at about 4 p.m into their mother’s custody after assuring she wouldn't be detained.

Silvia, who declined to provide her last name, believed her daughters’ rights as U.S. citizens were violated. She thinks the only reason she was able pick up her kids without being detained herself was because she contacted the Mexican consulate.

The consulate then contacted Ruiz-Velazco, an attorney and the executive director of PASO West Suburban Project, a social-justice group that works with immigrant communities.

“Luckily she reached out to the consulate, but this happens every single day and it should not take this for children to be with their family,” Ruiz-Velazco said.

Ruiz-Velazco said before the girls were released, she gave customs officials documents from the parents that authorized the release of the girls to her custody, but they refused.

Silvia said she was scared to go pick her daughters up as a result of recent threats of ICE raids and felt her rights would also be violated if she picked up her kids without the help from the consulate or community organizations like PASO. She encourages others to do the same if they are in similar situations.

Customs and Border Protection issued a statement saying that three children arrived at O’Hare accompanied by a Mexican citizen who was deemed “inadmissible.”

Officers then “attempted numerous times today to reach family members to pick up the children.”

The children were provided food and drinks during their wait.

U.S. Rep. Jan Schakowsky had just landed at O’Hare International Airport from Washington, D.C. when she got word of the girls’ situation and headed to the International Terminal as the situation was unfolding Thursday afternoon.

“I feel that it’s a kind of kidnapping of children by our government, and I am really fed up,” Schakowsky said. “They created a situation that didn’t have to be, and I am so resentful for this.”

Schakowsky attempted to meet with the children to check their well-being before they were released but said agents didn’t allow her.

The situation got the attention of Gov. J.B. Pritzker, prompting a tweet saying custom agents were using “children as pawns to advance a racist and xenophobic immigration policy.”

Chicago Mayor Lori Lightfoot also said she’d been working with customs officials to mediate return of the children.

“We can’t be there for every situation, and that’s what scares me,” Schakowsky said.

Manny Ramos is a corps member in Report for America, a not-for-profit journalism program that aims to bolster Sun-Times coverage of Chicago’s South and West sides