Trespass (Scotland) Act 1865

The Trespass (Scotland) Act 1865 (28 & 39 Vict c 56) is an Act of Parliament in the United Kingdom. 
The Act creates a criminal offence of trespass in Scotland in certain circumstances and applies a penalty which has been amended by the Criminal Justice Act 1982 to that of a fine not exceeding Level 1 on the standard scale for violation.
The Act applies to a wide variety of private property, although only to lodging, occupation and encampment on such property.
Developments.
Subsequent legislation, such as the Land Reform (Scotland) Act 2003, has created more general rights of access and encampment on private land in certain circumstances, with specific exclusions.