The government is establishing new rules for mortgages that will make it harder for some borrowers to qualify but that are designed to prevent the kind of risky lending that nearly caused the housing market to collapse during the financial crisis.

The Consumer Financial Protection Bureau on Thursday will roll out the first of several far-reaching changes to the nation’s mortgage market, limiting upfront fees and curtailing practices such as interest-only payments that can leave homeowners stuck with unsustainable loans. The agency also will set standards for how much income a consumer must have to obtain a mortgage.

This marks the first time the government has spelled out what constitutes a “qualified mortgage,” an effort to prevent the widespread toxic loans that hurt millions of Americans during the housing crisis.

Banks that offer qualified mortgages will be protected from lawsuits if they adhere to the criteria. The consumer agency hopes that will drive the entire industry to live by the tighter standards that have taken hold since the crisis, ensuring safer loans but potentially limiting the number of people who can qualify to buy a home.

“Credit is going to be restricted, at least a little,” said Cristian deRitis, a senior director at Moody’s Analytics. “The debt-to-income cap, for instance, is going to affect some folks at the lower end of the income scale.”

To obtain a qualified mortgage, a borrower cannot have a debt burden that amounts to more than 43 percent of income. That may make it more difficult for people with lower incomes to qualify. In real estate markets such as Washington, where prices are high, prospective buyers could run up against the cap as they stretch their finances to purchase homes.

Transition period

The rules will build in some exceptions to the cap for the next seven years so the real estate market nationwide has a chance to heal, officials said. During that period, people with higher incomes and top credit ratings could get qualified mortgages even if the loan brings total debt above 43 percent of monthly income.

The agency estimates that about three-quarters of the mortgages issued in 2011 met the debt-ratio limit and the other standards for qualified loans. An additional 20 percent of loans that year were above the debt-to-income ratio but met the other criteria. Such loans could potentially still qualify under the seven-year exception.

That exception could be key in allowing marginally qualified borrowers to meet the tighter guidelines, said David Stevens, chief executive of the Mortgage Bankers Association.

But considering how conservative lending standards have become, Stevens said, he suspects that the new rules will do nothing to extend lending to a broader swath of borrowers.

Lenders are under no obligation to issue only qualified mortgages; they just have to verify that borrowers have the ability to make their loan payments. There is little doubt, however, that banks, which have doled out billions in the past year to settle lawsuits related to mortgage abuses, will be lured by the protections afforded under the new loan category.

Protection for banks

If they follow qualified-mortgage standards, banks will receive a massive benefit: They will be all but protected from many homeowner lawsuits. The financial industry aggressively sought this safe harbor, and some analysts said it represented a big win for banks.

“Combined with the lack of a rigorous, market-wide loan-modification mandate, this rule leaves homeowners and the market vulnerable to yet another financial crisis,” said Alys Cohen, a lawyer at the National Consumer Law Center.

This legal shield does not affect the rights of borrowers to sue their lenders for violating other federal consumer-protection laws. And the CFPB has allowed an exception for some “subprime” borrowers — those with insufficient or weak credit histories — to challenge whether lenders followed the qualified-mortgage standards.

In the run-up to the housing crisis, banks and investors around the world made enormous amounts of money from the business of issuing mortgages. Many of these loans were packaged into securities that could be traded like stocks.

That motivated lenders to sell as many mortgages as possible. Eventually, as housing prices continued to rise, firms began to give mortgages to borrowers without getting proof of their incomes. Others issued loans that offered low interest rates for a few years and then soaring ones after that. As borrowers began to default on these bad loans, the ripple effect caused losses across the financial system.

Struggling homeowners couldn’t make payments, banks couldn’t sell loans and nearly collapsed from holding soured mortgage securities. Investors also suffered massive losses.

‘Ability to repay’ rule

The new standard would make no-documentation loans difficult to offer and shore up the industry’s underwriting standards, compelling banks to make sure they research whether a borrower can repay a loan. This “ability to repay” rule would require lenders to learn about a mortgage applicant’s income, employment status, credit history and total debt, among other criteria.

Further, a mortgage company could consider not just the borrower’s ability to afford a “teaser” rate, but whether he or she could make every payment until the loan is paid off.

Upfront fees, often used to give loan officers and brokers an incentive to make more loans, would be capped, while mortgages that allow interest-only payments or that are longer than 30 years would be excluded. Other exotic types of mortgages, where larger-than-usual payments are pushed to the end of a loan term, would also be prohibited, except in rural or underserved areas.

The qualified-mortgage rules also highlight the unusual authority of the CFPB. After a few months of taking comments, the agency can simply put the rules into effect. Other federal agencies need to obtain a vote on such matters from a bipartisan group of commissioners.

The CFPB said that after the comment period, the rules unveiled Thursday will take effect in January 2014. More rules are due from the agency by Jan. 21.