Wells Fargo has agreed to modify the mortgages of nearly 15,000 California homeowners who teeter on the brink of foreclosure under a $2 billion deal with state officials that was announced Monday.

San Francisco-based Wells Fargo and the state Attorney General's Office announced the settlement in connection with "pick-a-pay" loans originated by Wachovia and Oakland-based World Savings.

Wells Fargo and the Attorney General's office have been discussing the framework of this deal for some time, although the two sides did not provide details about how the accord was struck.

The bank didn't originate the loans, but was saddled with the World Savings loan portfolio when Wells bought Wachovia in 2008.

"Customers were offered adjustable-rate loans with payments that mushroomed to amounts that ultimately thousands of borrowers could not afford," Attorney General Jerry Brown said.

Under the pick-a-pay program, mortgage borrowers could pick the level of their monthly payments during the early years of their loans. As the loans matured, their payments sometimes would reach levels that outpaced the ability of borrowers to make the monthly mortgage.

Under the settlement, Wells Fargo will offer affordable loan modifications to an estimated 14,900 California borrowers with pick-a-pay loans made by World Savings or Wachovia.

Anne, an Emeryville resident who did not want her full name used, doesn't have a pick-a-pay loan. She nevertheless has been attempting to obtain a loan modification from Wells Fargo for an interest-only loan on her home, whose value is exceeded by the $513,000 in financing on the house.

"I approached Wells Fargo, and they seemed to want to help, but then I got stuck in miles and miles of paperwork," Anne said. "I have jumped through hoops to try to meet with them directly."

Anne's difficulties with the loan were complicated by the loss of her job in the high-tech sector this year and a family emergency a few years ago.

"You get to a point with Wells Fargo and then nothing," Anne said. "It's like the squeaky wheel. You have to get in someone's face. But I'm still waiting for some sort of an answer with them."

Some East Bay attorneys said the agreement between the bank and the state justice officials is a step in the right direction.

"This settlement is helpful," said Leslie Baxter, a partner with Pleasanton-based law firm Randick O'Dea & Tooliatos. "Banks have been more responsive to loan modifications recently. But it's helpful when the Attorney General brings an action. That gets the banks' attention." Baxter and her firm have been involved in advising clients about loan modifications.

"We had a bunch of very bad loans that banks have made, they didn't verify income, and you had borrowers who didn't have income to pay," said Jeffrey Allen, principal executive with Graves & Allen, an Oakland-based law firm. Allen offers advice connected with loan modifications.

Many of the modifications will include significant principal forgiveness. The total value of the modifications mandated by the settlement is projected to be more than $2 billion.

"Recognizing the harm caused by these loans, Wells Fargo accepted responsibility and entered into this settlement with my office," Brown said.

Brown also obliged Wells Fargo to pay $32 million in restitution to more than 12,000 pick-a-pay borrowers in California who lost their homes through foreclosure. Payments to foreclosed homeowners are expected to average more than $2,650.

Wells also agreed to provide $1.8 million to the state of California to cover unspecified costs.

To put the deal in perspective, in October of this year, Wells Fargo struck deals with the states of Colorado, Florida, Illinois, Nevada, New Jersey, Texas and Washington. That multistate deal totaled $772 million and helped 9,000 homeowners.

Several months ago, numerous states struck a deal with Countrywide that pulled in more than $8 billion.

This deal places a huge portion of the pick-a-pay portfolio that Wells Fargo inherited into a formal agreement with California, Wells said.

"This is our biggest deal so far," said Franklin Codel, chief financial officer with Wells Fargo Home Mortgage, a unit of the bank.

About 60 percent of the pick-a-pay portfolio that Wells Fargo inherited is in California.

"The agreement with California is an extension of the efforts had have had underway," said Teri Schrettenbrunner, a Wells Fargo spokeswoman. "We have hosted three large events. We also opened up 15 home preservation centers across the state."

Wells Fargo officials said they hope that homeowners who receive letters from the bank inviting them to begin a loan modification process will contact the financial firm.

"We are asking people to respond to our outreach," Schrettenbrunner said. "We hope they open the letters. One of our biggest challenges is to get people to return our requests for outreach so we can engage them in home retention efforts."

Anne, the Emeryville resident, remains dismayed that after a year she has yet to get her loan modified.

"I'm at my wit's end," Anne said. "I just need some relief."

Contact the Attorney General's Office at 916-445-9555, and Wells Fargo at 800-869-3557. Contact George Avalos at 925-977-8477.