Allstate Corp. and Bank of America Corp.’s Merrill Lynch unit agreed to end a lawsuit by the insurer over $167 million in mortgage-backed securities as the second-largest U.S. lender continues to resolve litigation tied to the financial crisis, Bloomberg News reported yesterday. The parties agreed to end the suit, filed in New York State Supreme Court in Manhattan in March 2011, according to a court filing dated yesterday. Terms weren’t revealed. Allstate, based in Northbrook, Ill., accused Merrill Lynch of selling it mortgage bonds that were riskier than promised.