Home Capital Group Inc., the Toronto-based alternative mortgage lender that was on the verge of collapse earlier this year, says it has repaid a $2-billion line of credit from Berkshire Hathaway Inc.

The company was given the financial lifeline last month by Berkshire Hathaway, which is headed by Warren Buffett, as it was trying to regain investor confidence following a run on deposits from customers.

When Berkshire Hathaway provided the line of credit, the firm also bought a $400-million stake in Home Capital.

Home Capital says proceeds from asset sales helped it repay the line of credit, bringing down the amount of interest expenses it faces as it continues to strengthen its liquidity position.

The lender, which provides mortgages to borrowers who don’t qualify for a loan from the big banks, faced allegations earlier this year from the Ontario Securities Commission that it misled investors in its handling of a scandal involving falsified loan applications.

Home Capital has since settled that case and a separate class-action lawsuit filed by investors.