Two day traders have been arrested by Norwegian police for allegedly cracking an algorithm of U.S. brokerage firm Timber Hill, in order to manipulate the stock prices of three companies listed on the Oslo Stock Exchange.

The two day traders, Svend Egil Larsen and Peder Veiby, have been charged with “market manipulation” and face up to six years in jail if convicted. Timber Hill is a subsidiary of Interactive Brokers and acts as its market maker.

Algorithms are used by high frequency traders all the time to artificially push the bid or offer price of a stock by sending fake indications of orders. But the activities of the two day traders are being cited in local Norwegian press as the first case of private investors reverse engineering a brokerage firm’s algorithm.

Norwegian police claim that between March 2007 and March 2008, the two traders conducted more than 2,200 purchase and sale orders which were “ not real” and jacked the price of the shares in three Norwegian companies up or down before taking a profit Bottom line: the two day traders outsmarted Timber Hill’s algorithm and made money in the process. The three Norwegian companies were Hafslund, Wilh. Wilhelmsen and Odfjell.

Veiby earned 250,000 Norwegian kroner ($40,698) in the alleged scam while Larsen earned 160,000 Norwegian kroner ($26,056). Timber Hill did not return Securities Technology Monitor’s call seeking comment by press time.

“In our view it is a deliberate manipulation against the computer they’ve been trading against so that the system changed the prices and they were able to earn money,” said Christian Steinberg with the Norwegian National Authority for Investigation and Prosecution of Economic and Environmental Crime in an interview with the Norwegian newspaper Dagens Naeringsliv.

The newpaper report said that Larsen declined to comment and Veiby denied any wrongdoing on the grounds he did “not act with the intent to commit price manipulation in the legal sense.” The alleged scam was uncovered by the Oslo Stock Exchange, which reported it to the Norwegian National Authority and Prosecution of Economic and Environmental Crime.