BoA acquired non-voting preferred stock yielding 7.25 per cent, in a move that will help Countrywide mitigate the problems arising from the US sub-prime crisis.
Each preferred share can be converted into Countrywide common stock at $18, according to a statement from California-based Countrywide.
Angelo Mozilo, chairman and chief executive of Countrywide, said: "Bank of America's investment in Countrywide represents a vote of confidence and strengthens our balance sheet, enabling us to position Countrywide for future growth and success."
Shares in Countrywide surged 20 per cent in after-hours trading, since news of the cash injection broke.
Figures from the Inside Mortgage Finance newsletter showed that Countrywide made 17.4 per cent of mortgage loans in the US between January and June this year. Bank of America, meanwhile, was responsible for 6.7 per cent of mortgage loans during the same period.