WASHINGTON (AP) — President Barack Obama signed legislation Friday that temporarily extends dozens of costly tax breaks for millions of businesses and homeowners, commuters, teachers and others.

The measure also allows people with disabilities to open tax-free savings accounts.

The law extends the tax breaks through Dec. 31, allowing taxpayers to claim them on their 2014 income tax returns. But the fate of the tax provisions beyond this year will again be uncertain. Congress routinely extends the package of tax breaks every year or two, but they were allowed to expire in January.

The package will add nearly $42 billion to the budget deficit over the next decade, according to congressional estimates.

The 54 tax breaks benefit big corporations and small businesses, as well as struggling homeowners and residents of states without a state income tax. More narrow provisions include tax breaks for filmmakers, racehorse owners and rum producers in Puerto Rico and the Virgin Islands.

House Republicans and Senate Democrats negotiated to make some of the tax breaks permanent. But talks faltered after the White House threatened to veto an emerging package, saying it tilted too heavily toward big corporations instead of families. Republicans will control both houses when the new Congress reconvenes in early January.

The tax-free savings accounts for people with disabilities are modeled after tax-free college savings accounts.

To qualify, a person would have to be diagnosed by age 26 with a disability that results in "marked and severe functional limitations;" those receiving Social Security disability benefits would also qualify. Families would be able to set up tax-free accounts at financial institutions, depositing up to $14,000 annually to pay for long-term needs such as education, transportation, housing and health care.

The contributions would be in after-tax dollars but earnings would grow tax-free.

The ABLE accounts would be allowed to accrue up to $100,000 in savings without the person losing eligibility for government aid such as Social Security; the current asset limit is $2,000. Medicaid coverage would continue no matter how much money is in the accounts.

Many lawmakers had insisted on cuts or revenue increases to offset the measure's $2 billion price tag over 10 years; the bill's sponsors found the savings in part by increasing the amount of levies on property for tax-delinquent Medicare providers and suppliers, cutting certain Medicare funding and making technical adjustments to cap worker's compensation.

Among the biggest tax breaks for businesses in the bill are a tax credit for research and development, an exemption that allows financial companies such as banks and investment firms to shield foreign profits from being taxed by the U.S., and several provisions that allow businesses to write off capital investments more quickly.

There is also a generous tax credit for using wind farms and other renewable energy sources to produce electricity.

The biggest tax break for individuals allows people who live in states without an income tax to deduct state and local sales taxes on their federal returns. Another protects struggling homeowners who get their mortgages reduced from paying income taxes on the amount of debt that was forgiven.

Other provisions benefit commuters who use public transportation and teachers who spend their own money on classroom supplies.

___

Associated Press writers Stephen Ohlemacher and Hope Yen contributed to this report.