Usucaption

Usucaption (Latin "usucapio"), also known as "acquisitive prescription", is a concept found in civil law systems and has its origin in the Roman law of property.
Usucaption is a method by which ownership of property (i.e. title to the property) can be gained by possession of it beyond the lapse of a certain period of time (acquiescence). While usucaption has been compared with adverse possession (that is, squatting), the true effect of usucaption is to remedy defects in title.
Roman law.
Background to usucaption.
The necessity for usucaption arose in Roman law with the divide between "res mancipi" and "res nec mancipi". "Res mancipi" required elaborate and inconvenient formal methods of conveyance to transfer title (a formal "mancipatio" ceremony, or "in iure cessio"). "Res nec manicipi" could be transferred by "traditio" (delivery) or "in iure cessio".
The remaining form of conveyance was "traditio". This was an informal conveyance which required only an intention to transfer and delivery of the property. If "res mancipi" were transferred by "traditio", full ownership would not pass and the recipient would become a bonitary owner.
Therefore another form of conveyance was required that did not necessitate a ceremony or appearance before the praetor. Because Rome was becoming mercantile, it was simply inconvenient to perform a formal conveyance simply because property was classed as "res mancipi". There might also be a demand to transfer property in private between the transferring parties, such as in the establishment of "fideicommissa" (Roman trusts).
The need for establishing ownership by means other than conveyance was also a result of the practical defect of a system of ownership based on valid transfer. Title to property could be challenged under this system, because it depended on the good title of the person from whom you acquired the property and so on. If any person's title in the chain were challenged successfully, then this would defeat any title derived from it. This defect required a means of establishing ownership that was not contingent upon a chain of title but could be established independently.
The Roman Law of Usucapio.
If however a bonitary owner kept the "res" (property) in his possession for a certain amount of time (two years for land, one year for chattels) his title would become full title and he could assert himself as "dominus".
Usucaption was the solution that emerged to address the defects of Roman ownership. It required five elements:
This largely ameliorated the problems experienced by conveyance as a means of establishing ownership, but could still yield harsh results. A purchaser of res mancipi could be on his way to successfully usucaping the property (e.g. 11 months in possession) but would lose his claim to it if his possession was challenged before the period of usucaption by someone who could establish title.
Usucaption was altered by the Actio Publiciana (see Gaius 4.36) which gave scope in the vindicatio (the action for property) for a fictitious usucaption. Such a situation would only arise where the claimant's possession of the property had been interrupted before the period required to usucape it had elapsed. The Actio Publiciana made provision for the possessor of the property to be taken to have usucaped it successfully, if he could show that he would have usucaped the property had his possession of it not been interrupted. In this way usucaption became the dominant form of establishing ownership in Rome.
Jewish rabbinic law.
In orthodox Jewish law, the right of usucaption is defined in a compendium of Oral Laws compiled in 189 CE, known as the Mishnah ("Baba Bathra" 3:1-ff.). The general scope of the law formerly provided for the right of possession of property in the absence of a legal deed or title, if, after three years of occupancy, no protest or counter-claim had been made to the same property.
Title by usucaption to houses, cisterns, trenches, vaults, dovecots, bath-houses, olive-presses, irrigated fields, and slaves, and aught that brings constant gain, is secured by occupation during three completed years; title by usucaption to unirrigated fields [is secured by occupation during] three years and they need not be completed.
If a dispute had arisen over property within this three-year time-frame, the property is assumed to belong to the person who challenges the claim of the squatter / illegal tenant, particularly, when the other is publicly known to have originally possessed the land or house. In such cases, if so-and-so "A" claimed that so-and-so "B" wrongfully took possession of his property, but so-and-so "B" retorted, "Yes, it was formerly yours, but you sold it to me," or "Yes, it was formerly yours, but I received it from you as a gift," - if "A" is known to have once possessed the property, he is assumed to be the rightful owner of the property, and it is the duty of "B" to show proof that "A" either sold it to him, or gave it to him as a gift. The absence of proof renders "B"'s hold of the property null and void. 
A squatter who fences in the property, or who locks it up, or who refurbishes it, or who has the keys to the property delivered unto him, are all signs of legal conveyance and is assumed to be the rightful owner, even in the absence of a legal deed. After three years of occupancy the squatter cannot be evicted from the property, unless the original owner can show proof or bring witnesses who testify to the effect that the property is still vested in his name, and that no transaction, conveyance or sale was made between him and the squatter, even though he held it for three years or more, in which case the squatter is forcibly evicted from the property and the court replevins the estate to its rightful owner.