JPMorgan Chase & Co. and Morgan Stanley will spend more than $7 billion to buy back auction-rate securities in a settlement announced Thursday by New York state Attorney General Andrew M. Cuomo and SEC Enforcement Division Director Linda Thomsen.

The deal ends investigations by the SEC and several states’ attorneys general into false claims made by the two firms in marketing auction-rate securities. At issue was the firms’ continuing effort to bill the securities as a safe investment even after the unraveling credit markets made them risky, less easily liquidated bets.