Dec 17 (Reuters) - The U.S. Justice Department is preparing to file civil fraud charges against Citigroup Inc and Bank of America’s Merrill Lynch unit over their sale of flawed mortgage securities ahead of the financial crisis, according to people familiar with the probes.

Civil investigators have compiled evidence that allegedly shows that investors lost tens of billions of dollars after purchasing securities Citigroup had marketed as safe even though the bank had reason to believe otherwise, one person said.

An investigation into the mortgage securities marketed by Merrill Lynch, which Bank of America agreed to acquire at the height of the crisis in 2008, is also close to completion, two other people said.

Probes against Royal Bank of Scotland and Credit Suisse are also underway and progressing, according to another two people familiar with those cases.

Representatives for all four banks declined to comment.

The U.S. banking industry, which faces a range of mortgage-related lawsuits, has contended that many of the alleged investor losses can be attributed to the financial crisis, and that they should not be held liable for marketing a variety of mortgage securities that ultimately soured.

The Justice Department has not determined the exact timing of upcoming lawsuits, the sources said, although U.S. Attorney General Eric Holder told Reuters earlier this month that the department planned to bring more mortgage-related cases in early 2014, while declining to name which companies were targeted.

The probes could also lead to settlements instead of lawsuits.

The cases stem from a government task force the Obama administration created in early 2012 to probe the sale of shoddy home loans repackaged for investors.

Last month, JPMorgan Chase entered a $13 billion settlement with the Justice Department and other agencies, to resolve charges that the bank overstated the quality of mortgages it was selling to investors.

The Department of Justice trumpeted that settlement as a big step toward holding banks accountable for their behavior before the financial crisis, and authorities have dedicated dozens of investigators to bringing similar lawsuits against other major Wall Street firms.

A representative from the Justice Department declined to comment.

Goldman Sachs has also disclosed it is under investigation and that future claims from the task force could result in a “significant increase” in the company’s liabilities.

While the investigation against Citigroup is the furthest along, disagreements about where that case might be filed could potentially push Merrill Lynch ahead, said one person familiar with the matter.

Lawyers at the U.S. Attorney’s offices in Brooklyn and in Colorado are both investigating Citigroup, and both want the high-profile case to be filed in their district, this person said. Officials are expected to meet this week to try to resolve the dispute, the source said.

Representatives from the U.S. Attorney’s offices in Colorado and Brooklyn declined comment. A spokeswoman for the U.S. Attorney’s office in New Jersey, which is investigating Merrill Lynch, also declined comment.

Royal Bank of Scotland is also under investigation and could face charges as early as the first half of 2014, sources said.

The Justice Department has also recently received further evidence, including internal communication records, regarding the mortgage activities of Swiss bank Credit Suisse, according to one person familiar with that case.

The source said the evidence shows Credit Suisse’s mortgage lending arm ignored red flags about its processes for signing off on loans and pushed to increase the output of them for the bank to bundle into securities. It is unclear how advanced that overall investigation is.