NEW YORK — Ghislaine Maxwell, a longtime confidante of sex offender Jeffrey Epstein, was arrested Thursday in New Hampshire on charges she recruited and groomed underage girls for abuse by her then-boyfriend, officials said.

A grand jury indictment unsealed Thursday charged Maxwell, daughter of the late media tycoon Robert Maxwell, with perjury and conspiring to entice minors to travel to engage in sex acts.

Maxwell has been under investigation for months as a possible accomplice to Epstein’s history of sexual abuse of underage girls. Epstein, who committed suicide while in federal custody last summer, dated Maxwell for years, and the indictment charges she played a key role in grooming girls for him to abuse.

Beginning in at least 1994, the indictment alleges, Maxwell “enticed and groomed multiple minor girls to engage in sex acts with Jeffrey Epstein, through a variety of means and methods.”

Acting U.S. Attorney Audrey Strauss called the sex abuse described in the Maxwell case “the prequel” to the charges they lodged last year against Epstein covering alleged acts of abuse in the early 2000s.

“Maxwell played a critical role in helping Epstein to identify, befriend, and groom minor victims for abuse,” said Strauss, who oversees the federal prosecutor’s office in the Southern District of New York. “In some cases, Maxwell participated in the abuse herself.”

A lawyer for Maxwell, Jeff Pagliuca, did not immediately respond to messages seeking comment.

David Boies, who along with Sigrid McCawley represents a dozen of Epstein’s accusers, said their clients were elated by the development. “It’s just an enormous step,” he said.

Boies said he thinks Maxwell will be under “tremendous pressure to cooperate” as she looks for ways to shave time off what may be a significant prison sentence. Maxwell could potentially help prosecutors shed light on Epstein’s dealings with other wealthy and influential people who may have had encounters with underage victims, he said, adding, “There were a lot of people with a lot of public stature … who were involved with Epstein.”

“The pain [Maxwell] has caused will never go away but today is a step toward healing,” McCawley added in a statement, praising prosecutors on the case for their “unrelenting courage.”

U.S. Magistrate Judge Andrea Johnstone ordered Maxwell to remain in custody at a brief hearing via videoconference in federal court in New Hampshire, where another of her attorneys, Lawrence Vogelman, did not seek an immediate bail hearing because her lawyers plan to make those arguments after she is transferred to New York.

In a court filing, prosecutors said Maxwell should stay behind bars pending trial because she might flee given her “extensive international ties,” noting she has citizenship in two countries and three passports in her name. Maxwell, 58, faces the possibility of 35 years in prison if convicted and has “absolutely no reason to stay in the United States,” prosecutors argued in the filing.

Prosecutors also said the Epstein investigation is not over and asked any victims or witnesses to Epstein’s abuse of minors to contact the FBI.

William Sweeney, head of the FBI’s New York office, called Maxwell “one of the villains” of the Epstein saga and said that agents kept close tabs on her after she “slithered away to a gorgeous property in New Hampshire.”

The indictment charged that Maxwell “would try to normalize sexual abuse for a minor victim by, among other things, discussing sexual topics, undressing in front of the victim, being present when a minor victim was undressed, and/or being present for sex acts involving the minor victim and Epstein.”

One of the victims was 14 years old when Epstein and Maxwell began grooming her for sex acts with Epstein, according to the indictment.

The victims were groomed or abused at a number of Epstein’s luxurious homes, including his sprawling Upper East Side townhouse in Manhattan, an estate in Palm Beach, Fla., a ranch in Santa Fe, N.M., and Maxwell’s home in London, according to the charges.

“Minor Victim-2,” according to the indictment, was under 18 when she was flown to New Mexico at Epstein’s invitation. “In New Mexico, Maxwell began her efforts to groom Minor Victim-2 for abuse by Epstein by, among other things, providing an unsolicited massage to Minor Victim-2, during which Minor Victim-2 was topless,” the indictment charged.

Maxwell is also accused of grooming and befriending a third victim, whom she met in London between 1994 and 1995. She allegedly encouraged that victim to give Epstein massages “knowing that Epstein would engage in sex acts with Minor Victim-3 during those massages.”

The indictment also accuses Maxwell of lying in a deposition in 2016 when asked about these activities by a lawyer for one of Epstein’s alleged victims, when she denied any knowledge of him engaging in sex acts with minors. When asked if Epstein had a scheme to recruit underage girls for sexual massages, Maxwell replied, “I don’t know what you’re talking about,” the indictment says.

Strauss, the acting U.S. attorney in Manhattan, said the socialite told that lie and others in the deposition because the truth “was almost unspeakable — Maxwell enticed minor girls, got them to trust her, then delivered them into the trap that she and Epstein had set for them. She pretended to be a woman they could trust, all the while she was setting them up to be sexually abused by Epstein.”

Maxwell’s arrest was first reported Thursday by NBC News.

Epstein, 66, was a registered sex offender who was arrested last year on federal sex trafficking charges for alleged abuses of underage girls in New York and Florida. His suicide in a Manhattan federal detention center led to charges against two of his guards who were accused of failing to check on him in his cell in the hours before he was found hanging from a bedsheet.

Epstein’s ability to avoid a lengthy prison sentence has raised questions about whether the wealthy, politically connected sex offender ­— with ties to both President Trump and former president Bill Clinton — was able to manipulate state and federal officials to go easy on him.

Years before his 2019 arrest, Epstein had resolved similar allegations with a plea deal involving state charges in Florida that allowed him to spend a little more than a year in jail and leave daily for work — an arrangement widely criticized as too lenient. As part of that deal, prosecutors agreed not to pursue cases against Epstein’s associates who might have recruited girls for him.

Gloria Allred, a lawyer representing more than a dozen of Epstein’s alleged victims, said her clients hope Maxwell “will be accountable if the evidence presented in court proves beyond a reasonable doubt that she had a role in assisting and recruiting young girls to be sex trafficked and sexually victimized by Jeffrey Epstein.”

The investigation into Epstein’s conduct continued after his jailhouse death and has ensnared Britain’s Prince Andrew, another old friend of the late financier.

Federal prosecutors complained earlier this year that Andrew has provided “zero cooperation” to authorities.

One of Epstein’s accusers, Virginia Roberts Giuffre, claims she was paid by Epstein for sexual encounters with the prince when she was 17. The prince has denied any wrongdoing.

On Thursday, Strauss made clear prosecutors still want to talk to him.

“We would welcome Prince Andrew coming in to talk to us,” she said. “We would like to have the benefit of his statement.”

Epstein’s alleged victims continue to pursue lawsuits against his estate, which is valued at hundreds of millions of dollars.