Legislation to overhaul U.S. mortgage lending passed the House Thursday as lawmakers sought to rein in practices blamed for the foreclosure crisis.

The legislation is a tougher version of a bill that passed the House in 2007 but later stalled. The current bill would establish national minimum underwriting standards for home mortgages and require originators to retain a portion of the credit risk of mortgages they sell to third parties.

The legislation passed the House on a 300-114 vote.

Under the measure, mortgage lenders would be required to offer home purchase mortgages that a borrower has a "reasonable ability to repay." For refinancings, the lender has to believe the transaction provides a "net tangible benefit" to the borrower.

A lender violating these rules would be required within 90 days to modify or refinance the loan at no cost to make sure it meets the standards. Otherwise, the borrower could rescind the loan. A borrower would also have the right to sue companies that securitized the loan and sold it to investors, where the rules have been violated.

Tighter restrictions apply to the so-called high-cost mortgages at the center of the subprime bust. The bill would ban "balloon payments" and require prior counseling for such loans.

The legislation would also prohibit yield-spread premiums, payments to mortgage brokers or loan officers for steering borrowers to high-cost loans. And it seeks to revamp the mortgage securitization process, widely blamed for fueling the shoddy underwriting standards of the subprime boom.

House Financial Services Chairman Barney Frank, D-Mass., has predicted the bill will be signed into law by the end of the year. However, that timeline could be jeopardized by Senate Democrats' slower pace. The Senate Banking Committee has yet to tackle the issue of mortgage reform.

The credit risk of a securitized loan is born largely by investors, not loan originators. The legislation would require mortgage originators to retain at least 5% of the credit risk on loans they sell to third parties. The bill gives federal banking agencies the authority to set the level as well as leeway to make exceptions to the rule.

Proponents say the measure will give lenders "skin in the game", increasing the odds they will carefully underwrite the loan. The mortgage banking industry and many Republicans contend the measure would reduce mortgage credit for consumers. The industry warns that large lenders would have to hold extra capital against their loans and lenders that don't hold deposits would find it difficult to compete.

The legislation provides a legal "safe harbor" for certain mortgages that presumes they have met minimum underwriting standards. The safe harbor also exempts these loans from the risk-retention rules.

Qualifying loans include 30-year fixed-rate mortgages and other prime fixed-rate loans as well as adjustable-rate mortgages that meet certain standards. In addition, mortgages backed by the government or Fannie Mae (FNM) and Freddie Mac (FRE) would qualify.

Under the legislation, companies that securitize mortgage loans would have to preserve the ability to identify the loans it has sold and reacquire them if there were underwriting violations.

The legislation would also crack down on the appraiser industry. State appraiser licensing agencies would have oversight authority over appraisal management companies. The bill would bar appraisers from having a financial interest in the dwellings they appraise.

An amendment added to the bill would allocate funds from the bill to help mortgage servicers warn delinquent borrowers that they may be targets of fraud and inform them of how they can best protect themselves.

Another amendment would prohibit third parties from charging fees to consumers for mortgage modifications unless these actions benefit the consumer.

House members also agreed to an amendment that would require Fannie Mae and Freddie Mac to take into account factors such as the health of the local or regional housing market when determining fee schedules or occupancy and pre-sale guidelines for condominium and cooperative housing mortgages.

-By Jessica Holzer, Dow Jones Newswires; 202-862-9228; jessica.holzer@dowjones.com

(Fawn Johnson contributed to this report.)