Two computer programmers designed codes to falsify thousands of fake trade blotters and phantom records for swindler Bernard Madoff and took hush money to help keep the massive fraud going, U.S. authorities said.

The FBI arrested Jerome O'Hara, 46, and George Perez, 43, at their homes on Friday morning on criminal charges of conspiracy for falsifying books and records at both the broker-dealer and investment arms of Bernard L. Madoff Investment Securities LLC (BLMIS) in New York.

The computer codes and random algorithms they allegedly designed served to deceive investors and regulators and concealed Madoff's crimes, said federal prosecutor Preet Bharara. They have been charged for their roles in Madoff's epic fraud, and the investigation remains ongoing.

O'Hara's attorney Gordon Mehler said We intend to enter a plea of not guilty after Manhattan federal court magistrate judge Ronald Ellis ordered the men released on $1 million bail each with travel restrictions.

Perez's attorney Larry Krantz declined to comment.

Madoff was sentenced to 150 years in prison on June 29. The next day, law enforcement sources said the FBI expected as many as 10 people could be criminally charged for their roles in the decades-long fraud of as much as $65 billion.

Thousands of investors around the world were bilked in Wall Street's biggest investment fraud, a Ponzi scheme in which early investors were paid with the money of new clients.

Friday's criminal complaint said O'Hara and Perez developed computer programs to create books and records for a subset of Madoff investment clients, changed names of account holders, buyers and sellers of shares, altered trade details and made it appear the business traded on the London Stock Exchange.

'HOUSE 17' SERVER

Criminal and civil complaints against O'Hara and Perez said that in April 2006, they tried to delete 218 of 225 special computer programs run on an IBM server known in the Madoff firm as House 17. The men did not delete the monthly backup tapes.

In August or September 2006, they cashed out hundreds of thousands of dollars in their personal BLMIS accounts before meeting with Madoff and telling him they would no longer lie for him, the FBI and the SEC said.

The FBI found handwritten notes in O'Hara's desk. I won't lie any longer. Next time, I say 'ask Frank' said one note, according to the FBI, a reference to Madoff's long-time deputy, Frank DiPascali.

Madoff told DiPascali to pay the programmers whatever they wanted in order to keep them happy, the investigators said, and the programmers received pay increases of about 25 percent and net bonuses of about $60,000.

After that, the SEC said DiPascali convinced the programmers to modify programs so that he and other employees could create reports themselves. The other employees were not identified in court documents.

O'Hara and Perez were also served with civil charges by the U.S. Securities and Exchange Commission. They worked with Madoff from 1990 and 1991, respectively, until the once-respected financier was arrested on December 11, 2008.

The SEC said O'Hara and Perez knew that the House 17 computer was missing functioning programs needed for actual securities trading.

They were accused of knowing that the computer programs they developed in 2003 and 2004 contained fraudulent information used in U.S. and European regulatory reviews.

DiPascali, who is jailed awaiting sentencing and is cooperating with the government, was the primary source for information on the programmers, according to court documents. Madoff went to prison without cooperating in the probe.

Madoff, DiPascali and the firm's outside accountant, David Friehling, have all pleaded guilty to criminal charges.

O'Hara was arrested at his home in Malverne, New York, and Perez was arrested at home in East Brunswick, New Jersey. Their arrests bring to five the number of people who have been criminally charged in the case.

The charges against the pair carry maximum prison sentences of 30 years and millions of dollars in fines.

The case is USA v Jerome O'Hara and George Perez, U.S. District Court for the Southern District of New York, No. 09-mag-2484.

(Reporting by Grant McCool, Rachelle Younglai; Editing by John Wallace, Bernard Orr)