U.S. foreign exchange broker FXCM, which was slammed by the Swiss National Bank’s surprise move to uncap the Swiss franc against the euro, has received a US$300 million capital injection to stay afloat.

FXCM, which found itself in breach of its regulatory capital requirements amid client losses yesterday, announced that it has arranged financing with diversified holding company, Leucadia National Corp. The deal involves the provision of $300 million in cash that will allow FXCM to meet its regulatory capital requirements and continue normal operations.

The cash infusion comes in the form of a $300 million senior secured term loan with a two-year maturity and an initial coupon of 10%. Under the deal, if FXCM is sold, Leucadia will receive a certain percentage of the proceeds. The transaction is expected to close this afternoon.

“We could not be more grateful to Leucadia and its team for their rapid and effective response and to our regulators, who have been willing to work with us through this challenging process. Leucadia’s support and this financing are by far the best alternative for FXCM, our customers, our shareholders, and all other relevant constituencies,” said Drew Niv, CEO of FXCM.

“We believe this is an attractive investment for Leucadia and we look forward to a mutually beneficial relationship with FXCM management,” said Leucadia’s CEO, Richard Handler, and its president, Brian Friedman, in a statement.