In an action to recover the possession of any land, tenement or other real property, where the entry is forcible or when the possession thereof is unlawfully held by force, the merits of the title shall not be inquired into, and three years’ quiet possession of the premises immediately preceding the commencement of such action by the party in possession, or those under whom he holds, may be pleaded in bar thereof, unless the estate of such party in the premises is ended.