Prim Smatsorabudh was a voracious buyer of high-end handbags, authorities say: Givenchy, Fendi, Chanel. At one point, she was T.J. Maxx's biggest online customer in the world. She was also prone to making returns — over $1 million to that store alone.

Federal prosecutors in Virginia say it was all part of a lucrative scam. Smatsorabudh returned fake bags she bought from overseas, they allege, then sold the real products on eBay and Instagram.

Smatsorabudh, 41, of Arlington appeared in court Wednesday; a judge agreed that the Thai immigrant is a flight risk and ordered her held at least until a potential custodian can be found. She came to the United States on a student visa in 2010, Department of Homeland Security Special Agent William Corcoran testified, although he indicated that she had entered and exited the country previously. He did not say which school she attended but said she withdrew in May.

Corcoran said federal authorities began investigating Smatsorabudh in 2015 after T.J. Maxx flagged the high volume of returns and started monitoring her, putting over 200 bags she returned in a warehouse for inspection. All of the bags examined by representatives from luxury brands have been deemed counterfeits, Corcoran testified.

Smatsorabudh dealt directly with counterfeit bag-sellers in China, demanding high-quality fakes, according to an affidavit from Corcoran. “It is terribly FAKe dont send me celine from this factory again or I will stop buying from you,” she wrote one dealer. Another she criticized for cheap material, saying, “It looks like the real Chanel when you look from very far. But when you touch the leather. You can tell it’s fake bag.”

Authorities found 572 handbags in her apartment. Officials say they nabbed Smatsorabudh by buying one of her bags on eBay — a red Céline bag for $2,575 — and having T.J. Maxx verify that it came from their store.

Defense attorney Nina Ginsberg questioned how many of the 800 bags involved in the case were actually confirmed fakes.

“We have to wait and see how many of these handbags they can prove are counterfeit,” she said after court. “These items were accepted and returned as genuine for a long time. I have a feeling that the processes at T.J. Maxx are not as thorough as Agent Corcoran made them out to be.”

Corcoran testified that he was not very familiar with how T.J. Maxx dealt with returns and verified a bag’s authenticity, and he could not say how many of the bags in Smatsorabudh’s apartment were real. But pointing to the large number of shipments of bags from China and Hong Kong to the apartment, he said, “I do know that the genuine handbags are made in Italy, not in China.”

Corcoran said Smatsorabudh also violated the terms of her visa by working at the Beddow School, a Montessori school in Fort Washington.

Trudy Beddow, founder of the school, said Smatsorabudh taught primary school for the past year but is no longer working there.

Smatsorabudh, who is charged with wire fraud, has been held in jail since her arrest last week. Ginsberg said her client has applied for asylum and is therefore not currently at risk of deportation.

Prosecutors noted that Smatsorabudh has been arrested four times and once pleaded guilty to theft but has not served jail time.