Long queues of happy couples waiting to get married might be a common sight in Las Vegas. But lines of happily married couples waiting to get divorced? Only in China.

In major cities across the country last month, thousands of couples rushed to their local divorce registry office to dissolve their marriages in order to benefit from fast-expiring tax breaks on property investments for unmarried individuals. Local media reported long waits at registries in Beijing, Shanghai, Guangzhou and elsewhere as savvy investors sought to buy or sell a second home before the government introduced strict new regulations that would force married homeowners to pay hefty taxes on the sale of second properties.

The new regulations are designed to cool speculation in China’s feverish property market and are part of a package of measures that would require couples to pay up to 20% capital gains tax on the sale of second homes. But for determined investors, nothing gets in the way of a good bargain, and some quickly noticed that the 20% impost didn’t apply if the second home was bought before the couple were married — or after they got divorced.

China’s marriage law allows for divorce if couples simply sign an agreement to divorce, present themselves at the registry office and pay a fee of just $1.50. Weighed against the prospect of tens or even hundreds of thousands of dollars of profit from property investments, many couples are deciding the $1.50 charge is worth it.

According to media reports, in March the number of couples getting divorced in Tianjin, a large city on the eastern seaboard, soared to 300 per day — more than triple the normal amount. In Beijing, too, realtors reported a boom in divorcing couples seeking out new houses. “Half of the deals I made last month were cases where the couples were getting divorced,” a Mr. Jin, who works as an agent at one of the biggest realtors in Beijing, tells TIME. “These were all young couples between 25 and 35 years old, and all of them were looking to buy another house as an investment.”

As an emerging middle class accumulates wealth, more and more young families are finding that they have limited options to make good use of their money. With overseas investment options closed off by complex regulatory barriers, banks offering measly interest-rate returns on deposits and the stock markets on a never ending losing streak, there aren’t many attractive investment choices.

Some choose to invest in gold and other precious metals. Indeed, when gold prices fell sharply last week, shops in mainland China and Hong Kong quickly reported stock shortages and empty shelves. But China’s savvy purchasers have long had an affinity for putting their money into bricks and mortar, not least because property prices in most cities have soared over the past decade and continue to rise sharply.

With a seemingly endless supply of money flowing into the country’s property sector, and prices on a constant upward trajectory, regulators have long been worried about the frothy market giving rise to major property bubbles, especially in the most populous cities like Beijing and Shanghai. But it seems that canny investors are quick to spot ways around the cooling measures, hence the new vogue for divorce.

It’s not only profiteers who are choosing the divorce route. Many couples who simply want to trade up from their current home have realized that they can save tens of thousands of dollars by splitting up before making their next purchase. According to media reports, one couple in the southern city of Guangzhou, who already owned two apartments, saved $32,000 by getting divorced and selling one of their houses before buying another.

The divorce solution is extreme but it’s the kind of solution to which China’s put-upon middle classes have become accustomed. Civil-servant couples, for example, are subject to a particularly strict version of the one-child policy that would require them to give up their jobs if they had a second child. Some have decided to circumvent those rules by getting divorced and having a second child out of wedlock, registered under either parent’s name as a “first” child.

Of course, the country’s regulators have also taken notice of the long queues outside divorce registries and have acted to put a stop to the practice. In recent weeks, the government revised its regulations to increase the taxes payable by unmarried individuals selling a secondhand property, effectively cutting the most speculative investors out of the market.

Others, though, are still happy to break the knot, if only because they need not stay divorced for long. Realtor Jin advises his clients who are considering the process that they can be back in happy matrimonial bliss within as little as three weeks. “If you pay the full price in cash up front, the whole transaction can be completed in as little as 10 days — and even if you’re taking out a mortgage, it only takes about six weeks,” Jin says. “Once that’s done, you can go and get remarried right away.”