The same secret social media apps used by a predator to lure a 13-year-old Katy girl to Mexico were used by investigators to help track her down.

After a frantic search, the girl was found safe Sunday at a home in Mexico City. We're no longer naming her because she is underage and may have been a crime victim. So far, no charges have been filed in this case.

Instead of going to school on Friday, investigators say the middle schooler got on a bus to Laredo and walked across the border.

RELATED: 13-year-old runaway from Katy found in Mexico

"We know that once it's crossed that threshold, that many times they’re going to be sex trafficked or possibly even killed," said Harris County Sheriff Ed Gonzalez.

But that’s not what happened, against all odds.

Gonzalez says investigators tracked the 13-year-old through the same social media accounts an online predator used to find the girl last summer.

Her parents learned she was communicating with an older man and took action.

RELATED: Selling Girls | Sex traffickers are targeting our children

"The parents cut off internet access and took her phone away, but again, we feel this individual in Mexico provided her a back up phone and communication continued," Gonzalez explained.

A friend said the 8th grader used the secret phone in the school library to communicate with the man.

He apparently groomed her over time to convince her to leave home.

"These predators know it may not happen overnight, so these predators are committed to working these relationships with these vulnerable minors over time and strike at the appropriate time," Gonzalez said. "Then many times, it's too late."

RELATED: Parents should be aware of apps used by predators

This child is now safe, at the U.S. embassy in Mexico.

But so many others weren't so lucky.

"It’s a growing issue. Human trafficking is real. Sex trafficking is real. It’s happening here in our own backyard," Gonzalez warned.

The F.B.I. is working to reunite the girl with her family. It only took 48 hours to find her, which investigators say is rare.

"Truly, it's a miracle," said Tiffany Pardue, Vice President of Rescue Houston.

Bringing a missing girl home is never easy.

"In another case with a minor who has been trafficked it took 13 people working around the clock for eight solid days," Pardue said.

Rescue Houston is a group who works to free women from sex trafficking. Although it's too early to know if this 13-year-old was trafficked, investigators say she was groomed for more than a year.

"It seems to us like a long investment, but if you think in terms of how many relationships you're building at the same time," Pardue said.

Rescue Houston says this year, it's freed 82 women from sex trafficking, and 10 of them are minors.

"They can make a lot of money off a girl that comes into the industry at 13 years old, so they're willing to make that investment," Pardue said.

Make an investment, investigators say this predator did, even setting up a secret second phone with the 13-year-old when her parents took away her first phone and internet access.

"It is absolutely just a misconception, as a society, that it is an over there problem," Pardue said.

Rescue Houston operates a hotline you can call for help at (713)-322-8000. It's staffed 24/7, and they say 43 percent of the victims who called this year have been rescued.