PARIS — Ex-trader Jerome Kerviel was convicted on all counts Tuesday in history’s biggest rogue trading scandal, sentenced to at least three years in prison and ordered to pay his former employer damages of $6.7 billion – a sum so staggering it drew gasps in the courtroom.

The court rejected defense arguments that the 33-year-old trader was a scapegoat for a financial system gone haywire with greed and the pursuit of profit at any cost – a decision sure to take some pressure off the beleaguered banking system overall.

By ordering a tough sentence for a lone trader, the ruling marked a startling departure from the general atmosphere of hostility and suspicion about big banks in an era of financial turmoil. It was a huge victory for Kerviel’s former employer, Societe Generale SA, France’s second-biggest bank, which long had a reputation for cutting-edge financial engineering and has put in place tougher risk controls since the scandal broke in 2008.

Kerviel maintained that the bank and his bosses tolerated his massive risk-taking as long as it made money – a claim the bank strongly denied.

“I have the feeling Jerome Kerviel is paying for an entire system,” said Olivier Metzner, Kerviel’s lawyer, noting that his client hadn’t benefited financially from the fraud.

Kerviel stood expressionless as the court convicted him and pronounced a five-year sentence with two years suspended. Kerviel was found guilty on charges of forgery, breach of trust and unauthorized computer use for covering up bets worth nearly 50 billion euros between late 2007 and early 2008.

He was also banned for life from working in the financial industry.

In the most stunning blow, the court ordered Kerviel to pay the bank back the $6.7 billion that it lost unwinding his complex positions in January 2008 – a punishment nobody realistically expects him to repay.

French media calculated that based on his current salary of $3,150 a month as a computer consultant, it would take Kerviel 177,536 years to pay off the damages.

The sentence “is more symbolic than real” said Bradley Simon, a white collar criminal defense attorney.