The treatment margins for lung stereotactic body radiotherapy (SBRT) are often large to cover the tumor excursions resulting from respiration, such that underdosage of the tumor can be avoided. Magnetic resonance imaging (MRI)-guided multi-leaf collimator (MLC) tracking can potentially reduce the influence of respiration to allow for smaller treatment margins. However, tracking is accompanied by system latency that may induce residual tracking errors. Alternatively, a simpler mid-position delivery combined with trailing can be used. Trailing reduces influences of respiration by compensating for baseline motion, to potentially improve target coverage. In this study, we aim to show the feasibility of MRI-guided tracking and trailing to reduce influences of respiration during lung SBRT. Methods: We implemented MRI-guided tracking on the MR-linac using an Elekta research tracking interface to track tumor motion during intensity modulated radiotherapy (IMRT). A Quasar MRI 4D phantom was used to generate Lujan motion (cos 4 , 4 s period, 20 mm peak-to-peak amplitude) with and without 1.0 mm/min cranial drift. Phantom tumor positions were estimated from sagittal 2D cine-MRI (4 or 8 Hz) using cross-correlation-based template matching. To compensate the anticipated system latency, a linear ridge regression predictor was optimized for online MRI by comparing two predictor training approaches: training on multiple traces and training on a single trace. We created 15-beam clinical-grade lung SBRT plans for central targets (8 × 7.5 Gy) and peripheral targets (3 × 18 Gy) with different PTV margins for mid-position based motion management (3-5 mm) and for MLC tracking (3 mm). We used a film insert with a 3 cm spherical target to measure the spatial distribution and quantity of the delivered dose. A 1%/1 mm local gamma-analysis quantified dose differences between motion management strategies and reference cases. Additionally, a dose area histogram (DAH) revealed the target coverage relative to the reference scenario. Results: The prediction filter gain was on average 25% when trained on multiple traces and 44% when trained on a single trace. The filter reduced system latency from 313 AE 2 ms to 0 AE 5 ms for 4 Hz imaging and from 215 AE 3 ms to 3 AE 3 ms for 8 Hz. The local gamma analysis for the central delivery showed that tracking improved the gamma pass-rate from 23% to 96% for periodic motion and from 14% to 93% when baseline drift was applied. For the peripheral delivery during periodic motion, delivery pass-rates improved from 22% to 93%. Comparing mid-position delivery to trailing for periodic+drift motion increased the local gamma pass rate from 15% to 98% for a central delivery and from 8% to 98% for a peripheral delivery. Furthermore, the DAHs revealed a relative D 98% GTV coverage of 101% and 97% compared to the reference scenario for, respectively, central and peripheral tracking of periodic+drift motion. For trailing, a relative D 98% of 99% for central and 98% for peripheral trailing was found. Conclusions: We pro...