Bank of America Corp. reached an agreement to repay $45 billion in federal bailout funds and escape pay restrictions and other curbs imposed by the U.S. government.

Wednesday's announcement means the Charlotte, N.C., bank will be the first of seven companies to return their large, or "exceptional," taxpayer-funded lifelines. Bank of America got $25 billion in October 2008 through the Troubled Asset Relief Program as officials scrambled to steady the U.S. financial system. It received an additional $20 billion in January to...