FILE PHOTO: A sign is displayed on the Morgan Stanley building in New York U.S., July 16, 2018. REUTERS/Lucas Jackson

(Reuters) - Morgan Stanley will pay $150 million to settle charges it misled two large California public pension funds about the risks of mortgage-backed securities they bought in the years leading up to the 2008 global financial crisis.

The settlement announced on Thursday by California Attorney General Xavier Becerra resolves an April 2016 lawsuit filed by his predecessor Kamala Harris, who is now a U.S. senator.

Becerra said the California Public Employees’ Retirement System (CalPERS) will receive $122 million from the settlement, while the California State Teachers Retirement System (CalSTRS) will receive $8 million. The other $20 million will cover costs and help fund other investigations.

Morgan Stanley denied wrongdoing. A spokesman said the accord is the New York-based bank’s last regulatory settlement related to the financial crisis.

California said Morgan Stanley overstated the quality of subprime loans from lenders such as New Century Financial, which went bankrupt in 2007, that it bundled into seemingly safe securities that CalPERS and CalSTRS bought from 2003 to 2007.

The bank was also accused of failing to remove poor-quality loans from those securities, and hiding the risks because disclosure could become a “relationship killer” prompting lenders to send future business elsewhere.

“Morgan Stanley lied about the risks of its products and put profits over teachers and public employees who relied on its advice,” Becerra said.

The lawsuit was one of hundreds accusing banks of misleading investors in the marketing and sale of residential mortgage-backed securities. Morgan Stanley agreed in February 2016 to pay $3.2 billion to resolve federal and state claims over those securities.