Defaults on municipal bonds for decades have been far higher than reported by rating agencies, bringing into question the true risk of a common investment widely considered to be safe, according to a study released Wednesday by the Federal Reserve Bank of New York.

Economists at the agency counted 2,521 muni bond defaults since 1970, whereas ratings agency Moody’s Investors Service, for instance, reported 71.

Muni bonds often act as an investment haven for ordinary Americans, and the new findings reveal they may be more risky than previously thought. That has been the subject of debate among lawmakers and others in the wake of a series of bankruptcy filings in California and elsewhere, as well as the collapse of several municipal projects.

Supporters of muni bonds say that despite a few high-profile cases, government securities rarely default. Data from the New York Fed, however, suggests otherwise.

Ratings agencies only track the behavior of the bonds they rate, presenting a fragmented picture of the entire muni bond universe. For a more comprehensive look, the New York Fed merged defaults tracked by the three major rating agencies with unrated bonds reported by Mergent and S&P Capital IQ.

Researchers found no pattern of spikes in defaults during recessions, rather defaults appeared to be a “function of idiosyncratic factors associated with individual projects,” according to the study.

Muni bonds are a primary way states, towns and even hospitals and ballparks finance projects. They have become popular partly because holders of these bonds don’t have to pay state taxes on any gains. Individual investors, according to the Securities and Exchange Commission, hold 75 percent of the outstanding bonds in the $3.7 trillion muni market through mutual funds and exchange-traded funds.

General-obligation bonds, issued by municipalities, rarely fail because they are backed by tax revenue. But the Fed found bonds that finance hospitals, stadiums and nursing homes default at much higher rates because they have a narrower income stream. A sports stadium, for instance, needs to sell tickets, otherwise it may not generate enough to meet its debt obligations.

The worst-performing bonds were “industrial development” bonds that finance projects such as alternative energy plants or pollution control facilities. These bonds, which comprise nearly two-thirds of municipal issuance, fail at a 28 percent rate.

Some analysts contend that the study is overstating the number of defaults since these debts are repaid by corporations rather than cities or towns.

“There’s an apples-and-oranges comparison that makes it hard to take their findings and draw any inference into the broader risks in the muni market,” said Bart Mosley, co-president Trident Municipal Research, which tracks the bond market.

Authors of the New York Fed report were unavailable for comment.

Mosley added that unrated muni bonds, which produced the most defaults, are not a segment of the market where the average investor plays.

“Most broker-dealers have policies against selling unrated bonds to retail investors,” Mosley said. “A lot of unrated bonds are purchased by professional investors who specialize in high yield.”

Robert Kurtter, managing director of public finance at Moody’s, agrees that the Fed’s inclusion of unrated bonds in its study skews investor risk, but he finds some aspects of the study useful.

“The report is consistent with the message that we’ve been communicating to the marketplace about the risk in unrated bonds,” he said.

Whereas Moody’s has logged six municipal defaults so far this year, Kurtter said there have been 180 unrated muni bond defaults. Similarly, Standard & Poor’s has tracked six defaults within the pool of muni bonds it rates, said Gabriel Petek, the agency’s credit analyst .

According to the S&P Municipal Bond Index, outstanding defaults reached more than $8.4 billion in the first six months of the year. The index tracks $1.3 trillion of muni bonds, nearly half of the market.

The New York Fed study arrives on the heels of a report by the SEC calling for greater transparency in the muni market. The agency wants to institute mandatory disclosure rules and uniform accounting standards to protect investors.