Imagine you buy a foreclosed home. You go through all the hassle of meeting with real estate agents and the pain of housing contracts. You hand over one of the largest checks you’ll ever write and get the keys to your property. But on entering your new home, you encounter a problem—someone is living there. Despite your producing the deed, he refuses to leave. Even worse, law enforcement declines to remove the individual from your property.

While this scenario may sound far-fetched, it’s not uncommon in the United States. The collapse of the housing market in 2007-08 left many vacant distressed properties inhabited by squatters.

Nearly every state has an “adverse possession” law, which allows individuals who illegally occupy a property to gain legal rights to it by maintaining residency for a certain period. Some of these laws are more than 100 years old and were originally intended to settle of centuries-old land disputes. But these laws now create a nightmare for many property owners.

In light of the housing crisis, many houses now bought at auction had been vacant for months or even years, making them prime targets for opportunistic squatters. After the auction, squatters often retain possession using adverse possession as a shield. To remove someone from the property, the new owners must hire a lawyer and begin the slow process of eviction, adding to their costs and tying up assets.

Through this policy the government is essentially encouraging squatting. This is particularly problematic in places like Florida. The state’s adverse-possession law has a unique court process that allows squatters 30-days’ notice to appear in court after a summons (which can take months to obtain) and a 30-day leave when objections are made. At that point they can object to the eviction, present fake leases, and delay the eviction for months. In many cases a squatter in Florida can be fairly sure he can occupy a house for at least six months before eviction. In California the eviction process can take more than a year and $100,000. This knowledge isn’t lost on squatters. Squatting numbers continue to rise throughout the country due to the eviction courts’ sluggishness.

There are additional problems associated with these laws. Knowing they have months before a court order would force them to leave, squatters have taken to extortion. In this black-market process called “Cash for Keys,” property owners agree to pay squatters in order to avoid the long legal delay. Homeowners sometimes pay squatters more than $12,000 to leave the property they own! Knowing they’ll otherwise be paying legal fees and have their property tied up for months, many owners feel they have no choice but to accept the deal.

Cash for Keys is also bad for communities as a whole. Recognizing that buying a vacant property may mean months of headaches and thousands of dollars in legal fees, or extortion by savvy squatters, many potential buyers may forgo buying vacant property at all. As a result, properties continue to deteriorate and property values of neighboring homes fall.

Cash for Keys and the incentive for squatters to settle on vacant property could be easily eliminated if the eviction process was streamlined or if the adverse-possession laws were revisited. Instead of allowing squatters 30 days to appear in court, for example, they could be given one week. Objections and delays could be reduced to three days from 30 days. This would get the owner into the house within a month and eliminate the ability of squatters to extort owners.

Protecting private property rights is one of the most important jobs the government undertakes. Private property means that an individual has an exclusive right to use a particular asset. He doesn’t have to worry about someone else using his property without his permission, and as a result he has the incentive to take good care of it. When private property rights are absent or weak, as is the case with adverse-possession laws, these incentives break down. The result is bad news for homeowners, investors, and communities.