The Justice Department has sued Deutsche Bank over allegations of tax fraud, saying the German lender owes taxes and penalties amounting to more than $190 million over a transaction that took place more than a decade ago.

The US Attorney for the Southern District of New York, Preet Bharara, in a civil suit filed Monday in Manhattan federal court alleged that Deutsche Bank struck a deal to create shell companies to help it avoid paying taxes. Deutsche Bank says it plans to contest the allegations.

The taxes in question would have been triggered by selling Bristol-Myers Squibb Co. stock that Deutsche Bank had received as part of a 1999 acquisition.

In the spring of 2000, Deutsche Bank sold the company that held the stock to the shell companies for a price that the Justice Department says didn’t represent its fair value given “the tens of millions of dollars of tax liabilities on the built-in gains.”

One of the shell companies bought the stock using a short-term loan and then immediately sold it back to Deutsche Bank, Bharara’s office alleged. The sale triggered a tax liability for the shell company, which after paying back the loan and other expenses didn’t have the money to pay the tax bill.

Deutsche Bank then sold the stock without paying the tax liability, alleges the Justice Department.

The Justice Department’s civil suit comes amid heightened scrutiny over how banks and their clients handled US tax bills. Credit Suisse Group in May admitted it conspired to aid tax evasion and agreed to pay $2.6 billion to settle a long-running probe with the Justice Department. UBS agreed to pay $780 million as part of a deferred-prosecution agreement in 2009. As part of that deal, UBS acknowledged aiding US tax evasion but didn’t plead guilty.

Deutsche Bank has been investigated on taxes related to stock sales before. In 2009, the bank paid $6 million as part of a previously undisclosed settlement with the Internal Revenue Service over the matter, according to a person familiar with that settlement. The IRS investigated the matter between 2003 and 2009.

Related

The bank has taken the position with prosecutors that the IRS settlement should resolve the matter, according to people familiar with the situation. But prosecutors disagree and believe the $6 million doesn’t address the tax liabilities owed as a result of the alleged shell-company scheme, the people said.

“Deutsche Bank tried to make its potential tax liabilities disappear,” Bharara said in a statement. “This was nothing more than a shell game.”

A spokeswoman for Deutsche Bank said: “We fully addressed the government’s concerns about this 14-year-old transaction in a 2009 agreement with the IRS.”

“In connection with that agreement they abandoned their theory that DB was liable for these taxes, and while it is not clear to us why we are being pursued again for the same taxes, we plan to again defend vigorously against these claims,” she said.

According to the Justice Department, the lawsuit is aiming to recover the unpaid taxes, along with penalties and interest.

In the fall of 1999, Deutsche Bank was looking to profit from deals in which it would incur income that it could shelter from taxation, prosecutors said in court documents. The bank ultimately settled on the plan to use a shell company to shed the tax liability, prosecutors said in the documents. Deutsche Bank should have known the holding company would incur a tax liability it was unable to pay, and if the bank was unaware of that, it was because people in the bank “actively avoided such knowledge,” the documents said.

Write to Saabira Chaudhuri at saabira.chaudhuri@wsj.com and Christopher M. Matthews at christopher.matthews@wsj.com