A Goldman Sachs programmer stole secret computer code that enables high-speed trading on his last day with the company so he could help develop the same kind of system at a startup financial company, a prosecutor said Tuesday, while a defense lawyer disputed that his client had committed a crime.

In opening statements at the criminal trial, Assistant U.S. Attorney Joseph Facciponti called the allegations against Sergey Aleynikov of North Caldwell, N.J., "a case about theft and greed."

He told the jury in U.S. District Court in Manhattan that Aleynikov was "meticulous, deliberate and clever" in his theft and coverup on June 5, 2009, just minutes before he went out for drinks with unsuspecting coworkers who wanted to celebrate his last day after two years at the company that had promoted him to a vice president.

Facciponti said Aleynikov, a naturalized U.S. citizen who came to the U.S. from Russia in 1990, was leaving his $400,000 job as a vice president at Goldman Sachs Group Inc. to join Teza Technologies LLC, where he was to be paid $300,000 annually, with a $700,000 bonus in his first year and a revenue-sharing plan that would pay him an additional $150,000.

Aleynikov's lawyer, Kevin Marino, disputed the portrayal of his client as a spy.

"This is not a case of espionage," Marino said. "It's not a federal crime. It's not a crime at all."

Marino said Aleynikov was merely trying to copy parts of the company's software that was taken from public software codes. He acknowledged that Aleynikov had violated the company's confidentiality agreements but said that was a civil matter that the company could have pursued with a lawsuit.

Instead, he said, the company notified the FBI, which arrested him on July 3, 2009, as he returned from a trip to his new employer's offices in Chicago. He was charged with theft of trade secrets and interstate transportation of stolen property.

Highlighted at the trial, which is expected to last several weeks, are the sophisticated computer programs that use mathematical formulas to execute scores of trades in short periods of time after evaluating moment-to-moment developments in the markets.

The government said Goldman Sachs makes millions of dollars a year in profits from high-frequency trading and carries a competitive advantage over rivals because of the speed of its computer programs.

Facciponti said Aleynikov tried to steal Goldman's computer source code so he could use it in his new job as an executive vice president at Teza, where he was supposed to develop Teza's own high-frequency trading business.

The prosecutor said Aleynikov developed a special program just to copy and compress Goldman's files and another file to encrypt them before he sent them to a computer server in Germany, outside of Goldman's computer network. After transferring the files, he erased records of the transfer to hide what he had done, Facciponti said.