WASHINGTON (Reuters) - A Russian-owned group of companies has agreed to pay nearly $6 million to settle U.S. civil allegations that the firms laundered proceeds of a $230 million tax fraud, ending a politically charged case days before it was set to go to trial.

Federal prosecutors in New York announced late Friday the surprise settlement between the U.S. government and Russian businessman Denis Katsyv, the owner of Prevezon Holdings, as both sides were preparing to bring the three-year case to trial next week.

“We will not allow the U.S. financial system to be used to launder the proceeds of crimes committed anywhere – here in the U.S., in Russia, or anywhere else,” Acting Manhattan U.S. Attorney Joon H. Kim said in a statement.

The settlement comes after Prevezon was hit with key setbacks last week: U.S. District Judge William Pauley denied a summary judgment motion by the defense and granted a government motion to admit evidence from a Russian criminal case.

In a statement Prevezon portrayed the settlement as a victory, saying that the deal was struck without it admitting guilt and that the payment represented less than three percent the amount initially sought by the U.S. government.

“It’s almost an admission that they shouldn’t have brought the case,” Katsyv’s attorney, Faith Gay of Quinn Emanuel Urquhart & Sullivan LLP, told Reuters. “The settlement is the amount it would have cost to try the case.”

U.S. authorities had sought to seize more than $20 million in Manhattan condos and bank accounts from Prevezon and related companies prosecutors had claimed were used to launder money stolen by corrupt Russian tax officials. Under the settlement, none of the companies admitted wrongdoing.

The settlement brings an end to a case that raised many of the elements of distrust between Moscow and Washington, such as economic sanctions and allegations of political corruption.

U.S. authorities said the elaborate tax fraud and money laundering allegations were first uncovered by Sergei Magnitsky, Russian accountant for investment firm Hermitage Capital.

After accusing Russian officials of the $230 million tax fraud, he was arrested on tax evasion charges and died in prison a year later, prosecutors said.

The Kremlin’s human rights council found that Magnitsky likely died from a beating delivered by guards and medical neglect. Russian authorities have said Magnitsky death was caused by heart failure, not foul play.

In 2012, at the urging of Magnitsky’s former employer, Hermitage Capital CEO William Browder, Washington passed a law freezing any U.S. assets of Russian investigators and prosecutors said to have been involved in the accountant’s detention. In retaliation, Moscow barred Americans from adopting Russian children

In the settlement agreement, prosecutors stated that none of the defendants had a role in the death of Magnitsky.

Katsyv’s attorney Gay said the current controversy over allegations of Russian meddling in U.S. elections had likely motivated both sides to settle before trial. “It’s such a heated political environment right now,” she said. “I’m sure that was a factor.”