NEW YORK – Two longtime back office employees of Bernard Madoff were arrested Thursday on charges that they helped the disgraced financier dupe investors for decades by making fictitious investments – and that they cashed in on the epic Ponzi scheme themselves.

FBI agents arrested Joann Crupi at her house in Westfield, N.J., while Annette Bongiorno was picked up at her home in Boca Raton, Fla.

An indictment unsealed in federal court in Manhattan alleges that Crupi, 49, and Bongiorno, 62, ” ‘executed’ trades in the accounts of (wealthy clients) only on paper and that achieved annual rates of return that had been predetermined by Madoff.”

Prosecutors, citing internal communications, say Bongiorno used a computer program designed to backdate trades and manipulate account statements.

“I need the ability to give any settlement date I want,” she wrote to a manager in the early 1990s, according to the indictment.

Crupi, whose first and only job was with Madoff, was charged with creating false records to cover her boss’ tracks amid reviews by the Securities and Exchange Commission. Prosecutors say that as the scheme unraveled, she “became aware that client redemption requests bore no relationship to (the business’) cash on hand, which by late 2008 was woefully insufficient to meet those requests,” the indictment said.

Seized records show that Bongiorno deposited about $920,000 in her own Madoff account from 1975 to 2008 and withdrew more than $14 million over the same period, the indictment said. Crupi received hundreds of thousands of dollars in “off the books” income, it said.

The women “protected and perpetuated the Madoff mirage while putting very real money in their own pockets,” U.S. Attorney Preet Bharara said in a statement. Both are charged with conspiracy, securities fraud and falsifying records.

In Manhattan, a judge set bail at $5 million for Crupi. She was expected to be released sometime today.

Bongiorno appeared in court in West Palm Beach, Fla. A bail hearing was scheduled for Monday, meaning Bongiorno will spend at least the weekend in jail.