Bankruptcy judges would get new authority to modify the terms of a mortgage on a homeowner’s primary residence under legislation approved Wednesday by the House Judiciary Committee to assist homeowners facing foreclosures because of the recent sub-prime mortgage crisis.

The bill — fiercely opposed by the lending industry but supported by Democrats and consumer advocates — was passed by the House Judiciary Committee 17 to 15, with one Republican supporting it.