Eine autonome Landmaschine (105) ist dazu eingerichtet, eine vorbestimmte geographische Grenze (110) nicht zu überqueren. Ein Verfahren (200) zum Steuern der Landmaschine (105) umfasst Schritte des Bestimmens einer Trajektorie (155) eines beweglichen Objekts (150) in einer Umgebung der Landmaschine (105); des Bestimmens einer Trajektorie (120) der Landmaschine (105); des Bestimmens eines voraussichtlichen Kollisionspunkts (160) zwischen der Landmaschine (105) und dem beweglichen Objekt (150) auf der Basis der Trajektorien (120, 155); und des Anpassens einer geplanten Trajektorie (120') der Landmaschine (105) derart, dass der voraussichtliche Kollisionspunkt (160) auf einer anderen Seite der Grenze (110) als die Landmaschine (105) liegt.An autonomous agricultural machine (105) is set up not to cross a predetermined geographical boundary (110). A method (200) for controlling the agricultural machine (105) comprises steps of determining a trajectory (155) of a movable object (150) in an environment of the agricultural machine (105); determining a trajectory (120) of the agricultural machine (105); determining an expected collision point (160) between the agricultural machine (105) and the moving object (150) based on the trajectories (120, 155); and adapting a planned trajectory (120 ') of the agricultural machine (105) such that the probable collision point (160) lies on a different side of the border (110) than the agricultural machine (105).