Squatter's rights are referred to as adverse possession in modern legal parlance. Adverse possession allows a trespasser to enter someone else's land and gain anything from a small easement (such as a legal right-of-way) to complete control of the property. California law allows for adverse possession where a trespasser complies with several strict legal requirements.
Rationale Behind Adverse Possession
It seems inconsistent with owner rights to allow a trespasser to take legal claim to land, but the policy serves many useful services. First, trespassers may not be intentionally squatting on land. A faulty deed or a dishonest seller may have given the occupier the reasonable belief that she is legally occupying or using the parcel of land in dispute.
To successfully claim adverse possession, a squatter must occupy the land for an extended duration, which means that the land is essentially unused by the original landowner, and thus is being put to productive use, rather than sitting ignored.
Open and Hostile Possession
California adverse possession rules are located in Sections 315-330 of the California Code of Civil Procedure. Adverse possession requires open, notorious and continuous possession of a hostile and exclusive nature. This means that a trespasser must take actual physical possession, openly using and improving the land, for her exclusive benefit. It must be the type of use that would be easily observable by a passer-by or by the legal owner. The use and occupation must be continuous; it cannot be temporary, or occasional, or the time period requirement resets.
This must continue for 5 years for an adverse possession claim to mature under Section 322. The payment of property taxes on the land will also be required to allow a squatter to make a claim of legal ownership as opposed to a claim of use (easement) of the property against the original landowner.
If the squatter is in a landlord-tenant relationship, then the adverse possession is 5 years from the last payment of rent, so it will not include the time occupying the property during the lease.
Defenses Against Adverse Possession
The law clearly codifies the belief that a landowner who does not police her properties deserves to lose them, as it is of no benefit to the state to allow land to sit unused. Therefore a landowner needs to make periodic inspections of her land, merely posting signs is insufficient. Another option is to give permission for use of land.
For example, if an absentee landowner were to give written permission to a adjacent property-owner to plant a garden or allow the neighbor's cattle to graze on her land, she can defuse any adverse possession claim since she has acknowledged the use and given permission. Offering to rent property to the user is another option to break any attempt at continuous possession.