Three years ago, Eric Noe Araujo Flores asked his former nanny to help him find “friends” in his home country of El Salvador. She connected him with her niece, a 14-year-old who was being threatened by local street gangs. He offered to protect her and her family — if she had sex with him.

Flores, who lives in Loudoun County, visited El Salvador three times in 2013 and 2014 to have sex with the girl, paying her mother and telling her he was the only thing standing between her and violent gangs. Prosecutors said he probably would never have been caught had he not then decided — after the girl tried to commit suicide — to smuggle her and her mother into the United States in June 2014. There, he continued to force himself on her repeatedly for another eight months.

On Friday, the 34-year-old was sentenced at the U.S. District Court for the Eastern District of Virginia to 25 years in prison on sex trafficking and sex tourism charges. Once he completes his sentence, he could face deportation proceedings, officials said. Prosecutors said the case highlights a crime that is often difficult to uncover, and authorities would not comment on how this case was first investigated.

“Sex trafficking and sex tourism are hidden crimes, and that’s what the defendant was counting on in this case,” Assistant U.S. Attorney Michael J. Frank said at the sentencing. Although sex tourism was made easier to prosecute in 2003 and has been targeted by a special FBI initiative since 2008, the cases are still difficult to prosecute because the victims are out of reach. Flores was found guilty in February; police interviewed the girl last year.

After bringing the girl — then 15 years old — and her mother through Texas, Flores put them up in an apartment not far from the home he shared with his wife and two daughters. He repeatedly forced himself on the girl, telling her that she would be evicted and deported if she did not give in, prosecutors said. He also said he would stop paying for rent and food for her and her mother.

“Unlike most mothers, [the girl’s] mother did not protect her,” Frank wrote in a court document.

Since Flores’s arrest, prosecutors said, the girl continues to suffer from post-traumatic stress disorder. The trial was nearly derailed, Frank said, because the victim was struggling so much that prosecutors were not sure she could testify.

“Frankly, her life is a mess,” Frank said in court.

Through an interpreter, Flores on Friday said only this: “What has been said is not fair.” At trial, he maintained his innocence, claiming he was actually working undercover to protect his own children from predators. In early conversations with police, according to court records, he said he thought that the girl was 18. However, several people told investigators that he was aware of her age before he met her.

Defense attorney Joseph Conte said that his client did not act in “a vacuum,” pointing to the relatives of the girl who aided in the exploitation.

“There’s been some help putting the victim in this situation from the victim’s mother, from the victim’s aunt,” Conte said.

U.S. District Judge Liam O’Grady said that the actions of others were irrelevant, as was the fact that Flores had only finished second grade. His defense attorney acknowledged that Flores had actually been very successful in the United States despite his limited education and English skills; his home in Ashburn is valued at $600,000.

“You took it upon yourself to violate every fundamental right the victim in this case had,” O’Grady told Flores. “The opportunity to get up in the morning and see the day as any other teenager would like to.”

In addition to his prison time and five years of supervised release, Flores was ordered to pay $40,370 in restitution to the victim.

Officials in Virginia could not comment on the legal status of the victim and her mother. But victims and family members of victims of human trafficking are eligible for immigration benefits. Flores initially entered the United States legally, and later obtained permanent resident status by using a fake name, authorities said.

Flores plans to appeal the verdict, his attorney said.