A 9-year-old U.S. citizen was accused of lying about her identity and was detained for more than 30 hours by Customs and Border Patrol (CBP) officers when she tried to cross the U.S.-Mexico border earlier this week, her family said.

Julia Isabel Amparo Medina was stopped on the routine journey from her home in Tijuana, Mexico to her school just over the border in San Ysidro, California, her mother Thelma Galaxia told local news outlet NBC 7 San Diego. Medina was being driven by a family friend, Michelle Cardenas, along with her 14-year-old brother and two other children.

Medina and her brother are both U.S. citizens with American passports.

Due to slow-moving traffic, Cardenas told the children to walk across the border, where the Medina siblings presented a CBP officer with U.S. passport cards. Both Galaxia and Medina told NBC 7 that CBP officers accused Medina of actually being her cousin, saying that she did not resemble the photograph in her passport card. According to Galaxia, Medina’s brother was forced to sign a document verifying the claim that Medina was in fact his cousin.

After questioning, Medina was detained overnight and was only released and reunited with her mother roughly 32 hours later after CBP had verified her identification.

“I was scared. I was sad because I didn’t have my mom or my brother. I was completely by myself,” Medina told NBC 7 of her experience in detention.

A CBP spokesperson told TIME that Medina had provided “inconsistent information” during her inspection,” and that she was taken into custody “to perform due diligence in confirming her identity and citizenship.” The spokesperson added that, “It’s important that CBP officials positively confirm the identity of a child traveling without a parent or legal guardian. Some specifics of our techniques for determining the true identity of a person crossing the border are law enforcement sensitive information.”

According to an official familiar with the situation, the reason for the length of the girl’s detention was to ensure and ascertain that she was not a victim of human trafficking.

Contact us at letters@time.com.