U.S. officials on Wednesday lodged criminal charges against two former JPMorgan Chase employees accused of concealing hundreds of millions of dollars in trading losses in an episode that cast a sour light on the bank’s high-risk investments.

Javier Martin-Artajo, the head of credit and equity trading at JPMorgan’s investment unit, and Julien Grout, a trader who worked for him, were charged with wire fraud, filing false information with the Securities and Exchange Commission and other crimes that were part of an alleged conspiracy to hide mounting trading losses on derivatives investments assembled in the bank’s London office.

Losses stemming from that unit eventually topped $6 billion.

The charges are the first filed in the “London whale” case, so named because the portfolio of a single trader, Bruno Iksil, grew so massive with extensive investments in credit default swaps.

The investments had proved profitable for JPMorgan but began generating large losses in early 2012 that Martin-Artajo, Grout and Iksil worked together to try to conceal, according to the federal charging documents. Iksil is cooperating with authorities and, according to a statement released by federal officials on Wednesday, will not be prosecuted.

JPMorgan chairman, president and chief executive Jamie Dimon has referred to the episode as the “most embarrassing” of his career. A company spokesman declined to comment.

At an afternoon news conference in New York, U.S. Attorney Preet Bharara said he felt the case reflected poorly on JPMorgan’s risk controls and culture, and he offered a tacit criticism of Dimon, who initially dismissed concerns about the bank’s investment unit as a “tempest in a teapot.”

“This was not a tempest in a teapot but rather a perfect storm,” Bharara said.

The complexity of the investments involved “does not give people a license to create false books and records,” Bharara said. “That goes double for the handsomely paid executives at a public company. Capitalism works best when its captains do not lie and cheat.”

Martin-Artajo and Grout are based in Europe. If convicted, they face up to five years in prison. Their attorneys did not respond to requests for comment.

The SEC is pursuing a separate civil complaint, which could result in a financial penalty and a ban from the finance industry. British authorities are also conducting a separate investigation.

Far beyond embarrassment, the incident caused serious fallout for JPMorgan, the country’s largest bank — including an earnings restatement to divulge the losses and a grilling on Capitol Hill. It also added to the sense that Wall Street had not learned the lessons of the 2008 financial crisis as Dimon in particular continued to argue that JPMorgan’s size and ability to make complex investments remained important to the bank and the U.S. economy.

Trading in credit default swaps and other exotic derivatives remains loosely regulated and is often conducted outside any formal exchange. Regulators in the United States, Europe and elsewhere are debating how best to oversee that part of the financial sector but have yet to come to terms.

Unlike the public trading that sets prices for stocks and bonds, it was the absence of any public exchange or formal market that, according to the charging documents, gave the JPMorgan employees leeway to try to cover their tracks as losses on their investments mounted.

Without an independent mechanism to set the value of different derivatives investments, traders were expected each day to provide a “mark to market” assessment of their portfolio’s value — essentially an estimate of how much those investments were worth.

There were different ways to make that evaluation, and outside indexes and other data that could be used. But as those indicators showed their investments declining in value, federal officials allege, Martin-Artajo and Grout ignored standard practice and ­JPMorgan’s internal rules and reported higher values to conceal the losses — while plowing in more money in hopes of making up the difference.

According to federal documents, the practice reached such proportions between March and May of 2012 that Iksil referred to it as “idiotic.” A spreadsheet they used to track the discrepancy between the “real” price of their investments and the one reported to other JPMorgan officials showed a gap at one point of nearly $300 million.

Internal JPMorgan risk controls, federal officials said, were too weak to challenge their assessments.

After the losses became apparent, the bank filed updated documents with the SEC in July 2012 noting that “certain individuals may have been seeking to avoid showing the full amount of losses in the portfolio.”

Federal officials said the investigation remains open, offering the possibility of further action, including a possible settlement between the bank and the SEC.

It is not clear whether the investigation may eventually involve other current or former ­JPMorgan officials.