New York (CNN) -- Four-year-old Emily Ruiz flew first class from Guatemala to the United States Wednesday for a tearful reunion with her mom, dad and younger brother.
Immigration officers treated her like royalty, said her lawyer, David Sperling. After her plane landed in Florida, one officer called her the "princess of Miami," he said.
She was hugging her parents before too much longer.
"Mission accomplished," Sperling said on Twitter.
The royal treatment and happy ending came nearly three weeks after the girl, a U.S. citizen, was unable to re-enter the United States because of a possible communication mix-up.
Her supporters say that she was wrongly denied entry into the United States, while officials say that her parents were given a chance to keep her from returning to Guatemala.
It is "a day to reflect on how such a tragic injustice could have been committed and to commit to making sure it never happens again," Sperling said in a statement Wednesday. "Why did U.S. government officials decide to put the immigration status of the parents above the rights of the parents?"
Emily, the daughter of Guatemalan immigrants living in New York without documentation, had spent five months recuperating from asthma while visiting her grandparents in Guatemala, Sperling said.
When her grandfather accompanied her on a flight back to the United States March 11, a customs officer at Dulles International Airport in suburban Virginia stopped him for an immigration violation dating back about 20 years, the lawyer said.
He was denied entry into the United States. That placed Emily in the middle of an immigration quagmire. According to her family, immigration officials gave her parents two options: Emily could be sent to Guatemala with her grandfather, or she could be turned over to state custody.
She returned to Central America.
"She was basically deported to Guatemala -- not in the legal sense, but effectively this is what happened," Sperling said earlier. "We're not here to criticize the government; really, we do not know who is responsible for this."
The U.S. Customs and Border Protection agency has said that it offered to have the parents pick Emily up.
The agency "strives to reunite U.S. citizen children with their parents. If the parents choose not to take custody of their children, (the agency) works with other agencies to ensure the children's safety and well being, up to and including releasing them into the custody of other relatives," spokesman Lloyd M. Sterling said.
"In this case, the parents were offered to pick up the child, but elected to have her returned to Guatemala with her grandfather."
Officials say they gave Emily's father the opportunity to pick her up. The father said the conversation took place in English, a language he does not understand well. He said he decided to send Emily back to Guatemala given what he understood were his options.
But on Wednesday, it was all about the happiness of being reunited.
"Emily is back with us now. We have no words to express the joy it brings us to see her and hold her," her father, Leonel Ruiz, said in a statement. "We are very happy because we were away from her for so long, without being able to see her or hold her."
Jeanne Butterfield, former executive director of the American Immigration Lawyers Association, said the customs officers had a number of choices once they decided to not allow Emily's grandfather into the country. The could have taken Emily to her connecting flight and put her in the care of the airline until she reached her parents in New York, or they could have allowed the parents or a third party to pick her up, she said. A third option would have been to contact Child Protective Services, which could have taken temporary custody of the little girl, she said.
"CBP had absolutely no basis to deny custody to parents based solely on their immigration status," she said.
CNN's Adriana Hauser contributed to this report.