A Person Who Deliberately Traveled Beyond Techum Shabbos — Eruvin 29a
תוספות מסכת עירובין דף כט עמוד א
והושיבו ר' מאיר בד' אמותיו - חוץ לעיר היה דבעיר היה מהלך את כולה כדאמר במי שהוציאוהו (דף מא:) ... ועוד כיון דחשבינן כל העיר כארבע אמות אפילו במזיד נמי מהלך את את כולה דמזיד נמי אית ליה ארבע אמות ...
According to the Tosafos (d.h. V'Hoshivo), a person who deliberately traveled beyond his allotted Techum Shabbos is only limited to the four amos in which he comes to a halt when those four amos do not happen to be in an enclosed city. However, if this person halted within a city (or within any other form of enclosure, such an airport), he is permitted to walk throughout the city.
The Beur Halachah, Orach Chaim 405:6 (d.h. Aval) notes that the Rambam and Shulchan Aruch dispute the Tosafos on this point. They hold that the person who deliberately traveled beyond his allotted Techum Shabbos is even limited to the four amos in which he comes to a halt when those four amos indeed do happen to be in an enclosed city. Normally, in the case of a dispute such as this one — i.e., one that concerns a Rabbinic Decree — we would rule in accordance with the lenient position (ספק דרבנן לקולא). In this case, however, the Beur Halachah cites many authorities who disagree with the Tosafos, and seeing that the disagreeing authorities make up a significant majority, he states that one may not conduct oneself leniently, and must therefore remain within the four amos in which he haltes, even if they are within an enclosed city.