Bank of America Corp. has agreed to pay mortgage insurer MBIA Inc. $1.6 billion to settle legal disputes related to home loans from its Countrywide Financial unit that were packaged into securities during the financial crisis, the bank announced Monday. The settlement, first reported by the Wall Street Journal on Monday, resolves all outstanding disputes between the two companies and requires each firm to drop its other multibillion claims against the other. The agreement must now be approved by the New York State Department of Financial Services. MBIA claimed Countrywide Financial, a Calabasas mortgage insurer that was acquired by Bank of America in 2008, provided bad information about the mortgages it agreed to insure. The agreement also requires Bank of America to forgive MBIA senior note debt and provide a $500 million line of credit to MBIA. It also allows Bank of America to buy 9.94 million shares of MBIA before May 2018 for $9.59, a discount to Friday’s closing price of $9.83. Shares for both company increased after the report. MBIA closed up 45 percent at $14.29 a share while Bank of America shares went up 5 percent to $12.88 Monday.