There may come a time when you vacate your home for an extended period of time—maybe because you’ve moved elsewhere, put your home on the market (while living with a friend or relative to cut costs) or left for a long trip abroad. In your absence, you picture your home relatively unchanged. After all, you locked the door on your way out. What could go wrong?

A lot, as it turns out. You may even find squatters have been living in your home. That’s what happened to one Georgia homeowner who found out four people (two adults and two children) had been living in the Atlanta-based home she was in the process of selling. In this case, as USA Today reports, the surprise tenants had allegedly moved in after “renting” the home from the “seller” on Craigslist.

While this confusion resulted from a possible housing scam, homeowners should be aware some squatters simply break the locks on vacant properties and take up residence. In fact, some states have squatters’ rights (also called adverse possession) to protect these individuals and reduce litigation. In California, squatters can “gain legal possession of property as long as they comply with certain legal requirements,” according to SF Gate. These requirements include:

  • Physically occupying the property for a designated amount of time
  • Paying property taxes for five years (varies by state)
  • Using the property exclusively

However, if the rightful owner of the property (you) attempts to repossess the property, or if the squatter abandons it, the clock resets to zero.

Your instincts will likely tell you to spring into action to regain control, but you could face a fine or even charges if you go about it the wrong way. There is, however, a list of legal procedures you can follow to legally evict trespassers, whether you’re a landlord with a tenant who refuses to leave the property after their lease expires or a homeowner who discovers a trespasser living in your empty house.You can’t padlock the doors, turn off utilities or try to scare them into leaving; you can call the police, serve an eviction notice and file a lawsuit.

Having squatters on your domain can bring up insurance issues, too. What if a squatter starts a fire and your home burns down? What if they end up trashing your property? First of all, it’s important not to cancel or neglect to renew your policy on your home before it goes uninhabited. As one California-based agent writes for Huff Post, “Many people don’t realize that their standard homeowners insurance policy won’t provide full coverage if their home sits unoccupied for a certain amount of time. The timeframe varies depending on your state and insurance carrier, but typically it’s 30 or 60 days. After that, you could be liable for losses related to theft or vandalism.”

Think about it: Empty homes are huge liability risks for insurers. These structures could face vandalism, theft, fire, undetected plumbing leaks and many more expensive forms of damage. Taking the time to square away insurance before you leave can save you a huge bill (not to mention headache) if something were to happen. If your carrier doesn’t offer the coverage your home will need while it’s unoccupied, compare homeowners insurance quotes and find one that does.

The best primary course of action is making your home inaccessible to squatters. Invest in sturdy lock-and-key systems for doors (and secure windows), ask trusted neighbors to keep an eye out for suspicious activities, make your home look occupied and check on the property regularly.

Leaving your home vacant means arranging for security and homeowners insurance coverage ahead of time, plus doing your due diligence to make sure that it stays safe and unoccupied. If you do encounter a squatter, always follow the legal protocol for eviction.