JEFFERSON CITY, Mo. — A $25 billion settlement with the nation's top mortgage lenders could provide a tempting and timely pot of new money for state lawmakers and governors looking to fill multi-million-dollar budget gaps.

Although most of the settlement goes directly to homeowners, the agreement includes nearly $2.7 billion for state governments to spend as they wish.

Officials in several states already are planning to use the money to plug budget holes while others are pledging to spend it on foreclosure prevention and counseling programs.

Some consumer advocates fear states could treat their flexible share of the mortgage settlement much like they did a 1998 settlement with big tobacco companies. Only a fraction of that $206 billion settlement actually has been spent on anti-tobacco efforts.

Copyright 2012 The Associated Press.