U.S. housing has posted some hopeful gains since the market hit bottom two years ago. Housing starts have nearly doubled since their nadir during the Great Recession, and house prices have gained back almost half of what they lost after the bubble burst.

The rebound has been a factor in the economy’s recent growth and in the decline of the unemployment rate.

The long-awaited turn in housing was powered in significant part by strong demand from investors, who took advantage of low prices and strong rental demand to buy distressed properties at a great rate. Fewer such properties are available, however, and as house prices have risen and rents have flattened, investor demand has begun to wane.

For the housing recovery to maintain its momentum, first-time and trade-up home buyers must pick up the slack. Yet these buyers face a significant barrier: Today only those with the cleanest of credit records are able to obtain mortgage loans. The average credit score on loans to buy homes last year was above 750 (on a scale of 300 to 850), some 50 points higher than the average for all consumers, and 50 points higher than the average among those who received mortgages a decade ago, before the housing bubble.

Limiting the pool of borrowers this much puts a considerable constraint on housing demand. Lowering the acceptable credit score to what it was before the housing bubble would expand the pool of potential borrowers by more than 12.5 million. If even half of those potential borrowers became homeowners, the effect on demand would be enormous.

Several mutually reinforcing factors are keeping credit tight.

First, lenders are less willing to take on risk, in part because they were burned in the housing collapse. Moreover, there are other costs associated with riskier lending, including legal and reputational problems related to loan defaults and the additional infrastructure and manpower needed to service distressed borrowers.

Lenders are also adjusting to changes related to the Dodd-Frank financial overhaul. One of the most significant is the qualified mortgage rule, which provides a safe harbor from borrower suits under the Truth in Lending Act. Many lenders will not make loans that fall outside of that safe harbor, and those who do are likely to restrict them to wealthy borrowers or those with very high credit scores.

Lastly, lenders are turning away many borrowers who meet the requirements for government-backed mortgages because of uncertainty about the government’s rules for loans that are deemed faulty because of underwriting mistakes. When a lender makes a loan insured by Fannie Mae, Freddie Mac or the Federal Housing Administration, it is with the understanding that the lender will not bear the cost of a default. But the government can force a lender to absorb the cost if the lender did not follow correct underwriting rules. In recent years, Fannie, Freddie and the FHA have been much more aggressive about returning defaulting loans to lenders.

This situation has led lenders to discount the credit risk protection they receive from the institutions. As a result, lenders are willing to make loans backed by Fannie, Freddie or FHA only if there is little prospect of default, so that they are not exposed to risk.

The constraints on credit are suppressing housing demand, which, in turn, has made the recovery less robust than it should be. The problem will only grow more acute when interest rates rise as the Fed retreats from its stimulus policies and more borrowers are priced out of the market. If left unaddressed, the consequences for the broader economy are deeply concerning.

Not all of the factors restricting credit can or should be addressed by government. The Dodd-Frank rules are important to ensuring market stability. And lenders are rightfully more careful about lending after the credit-driven crisis we have all endured. But some areas merit policymakers’ attention — and soon.

One is the uncertainty that the government’s housing agencies have created around the enforcement of their right to return credit risk to lenders. That alone is locking millions of borrowers out of the market, families who no one argues should be denied access to credit. Policymakers must also monitor the market’s response to the regulations becoming effective in the coming months to make sure that they strike the right balance between managing risk and maintaining adequate access to credit.

The goal, clearly, is not to return to the reckless lending standards of the bubble years but to strike a sensible balance between risk and access. Coming out of the crisis, we have understandably focused almost exclusively n managing risk, but in doing so, we are stifling credit and threatening the nation’s economic recovery. It is time to strike a better balance.

Mark Zandi is chief economist at Moody’s Analytics, a subsidiary of Moody’s Corp. He is the author of “Paying the Price,” an assessment of monetary and fiscal policy in the wake of the recession, and “Financial Shock,” a book about the financial crisis. His columns appear occasionally in The Washington Post. Jim Parrott, formerly of President Obama’s National Economic Council, contributed to this column.