A former Vanity Fair photo editor who was duped by faux heiress Anna Sorokin into paying a $62,000 tab for a luxury Morocco getaway burst into tears on the stand Wednesday as she recalled the ill-fated trip.

She said Sorokin, who she knew as Anna Delvey, invited her and two other pals on the all-expenses-paid getaway to Marrakech in May 2017.

Jurors at the 28-year-old accused grifter’s trial in Manhattan Supreme Court were shown photographs of their extravagant four-room villa at hotel La Mamounia, which included a private butler, swimming pool and garden.

After five days in the $7,000 a night suite, irate hotel staffers showed up at their door and demanded a working credit card.

“Anna was just sitting on the couch, she wasn’t making calls, her phone was just sitting on the table,” recalled Rachel Williams, who broke down in sobs. During her testimony, she rarely looked over at her former pal.

Sorokin, 28, kept insisting that she was waiting for the banks to return her calls and asked Williams to put down her personal AmEx to temporarily cover the mounting bill.

Williams’s card was charged, and she spent the next six months desperately begging Sorokin to pay her back.

“I feel so sick and am legit crying at work,” Williams texted Sorokin, who she says blamed the delay on her lawyers, bankers and taxes.

Williams dissolved into tears as she recalled being unable to pay her bills or rent because of the crushing debt.

It turned out Sorokin, who claimed to be a German heiress with a $60 million-euro fortune, was actually broke.

But Rachel Williams said that all wasn’t lost as she was able to recoup her losses, selling her story to HBO for $35,000 and inking a book deal with Simon & Schuster worth $300,000.

She insisted that money wasn’t her only motive. ”I just wanted to tell the story. I feel it’s an important story,” she testified at Sorokin’s larceny trial.

Prosecutors Catherine McCaw and Kaegan Mays-Williams say that Sorokin ripped off $275,000 from friends, businesses and hotels and tried to score a $22 million bank loan as she faked her way to the top of New York’s social scene.

Prior to the Morocco getaway, Williams said that she and Sorokin hung out almost every day, and Sorokin would treat her to lavish meals at the city’s top restaurants, spa treatments and personal training sessions.

The German national is charged with grand larceny, attempted grand larceny and theft of services raps and faces up to 15 years in prison if convicted of the top count.