In the rush to borrow before the Republican tax bill reshapes the debt market, states and municipalities are paying up. The biggest spree of debt issuance in more than a decade has pushed up borrowing costs and eroded returns in the $3.8 trillion municipal-debt market.

The flurry is so dense it’s threatening to become the biggest month of issuance in history, surpassing December 1985 when almost $55 billion was sold ahead of the Reagan-era tax reform. For now, visible supply for next month sits at $28 billion. That metric typically captures about half the eventual total, which would could well beat the record.

The supply glut has dented performance. Municipal bonds have lost 0.75 percent so far this month, according to the Bloomberg Barclays index. That puts them on track for the worst return since the 3.7 percent plunge in November 2016, when Donald Trump’s victory raised concern that his tax and spending plans would lead the Federal Reserve to hike rates more aggressively.

The rush to market has forced tax-exempt yields higher. Since the House tax bill was introduced, the 10-year triple-A Bloomberg BVAL benchmark has climbed by a quarter point. Munis are now the cheapest they’ve been relative to Treasuries since March, with 30-year tax-exempts yielding almost 103 percent of comparable yielding Treasuries.

The House bill promised to wipe out up to 40 percent of the tax-exempt market. On the plus side, it repealed the AMT, which forced airports, among others, to pay higher yields on any bonds they sold for improvements. It also prohibited the use of tax-exempt bonds to finance sports stadiums, effective the day of the bill.

While these changes were largely expected, the surprise was prohibitions on advance refundings —which states and municipalities use to trim borrowing costs—and on private activity bonds, a vast segment of the issuer community that includes all 501c3 nonprofits. Meaning: colleges, universities, hospitals, nursing homes, mortgage issuers, museums, as well as corporations.

Add those two categories together, and the municipal market shrinks from one where $400 billion annual years haven’t been uncommon to one where annual sales might amount to $250 billion or so—the market of the 1990s.

What was unleashed on Nov. 2 is the law of the land unless the Senate, now debating its own version of tax reform, which only seeks to prohibit advance refundings, passes a bill and then combines its version with the House’s.

That’s because bond lawyers, who assure buyers that a particular municipal securities issue is both valid and tax-exempt, won’t be able to provide unqualified opinions after Jan. 1, the effective date of H.R. 1.

All this can change if the Senate passes its own version of tax reform, and if both House and Senate versions can be combined, and if it is then signed into law. If advance refundings are included, as most analysts expect, issuers will continue to stuff the remaining calendar with those kinds of deals. But if private activity bonds escape the axe, expect those transactions to be pulled or postponed.

Tax reform and its consequences could have produced back-to-back record years for municipal bond issuance. As it stands, even if $56 billion in munis come to market in December, long-term sales would still total around $400 billion, far below last year’s record $426 billion.

Bust follows boom. No matter what happens with tax reform, analysts expect a big fall-off in new bond sales in January and even into February, with issuers having pulled so many planned deals into 2017. That means municipal bonds will get very expensive again.

Capitol building in Washington, D.C.

Bloomberg News