Purpose: To examine via Monte Carlo simulation the dosimetric operation of an EPID inside a bi���directional MRI���Linac system. The proposed system is a 1 T MRI which supports both perpendicular (transverse) and inline (longitudinal) 6 MV MRIgRT. Methods: BEAMnrc Monte Carlo simulations were used to model a Varian 6 MV linac. Phase space files were produced below the MLCs and were inputs to Geant4 Monte Carlo simulations. These consist of transporting the radiation beam through a phantom and then on to a detailed model of a Varian EPID. The Geant4 simulations take place inside magnetic field maps matched to Finite Element Modeling of the MRI���Linac system (COMSOL). Hence the EPID operation is simulated in the same conditions as a real MRI���linac system. Various EPID SSD's were simulated in both inline and perpendicular field MRI���linac systems. Dose to the EPID layers were taken for each field and compared with zero magnetic field. Results: The inclusion of the magnetic fringe field had little impact in the inline direction, however in the perpendicular direction the electron���return effect (ERE) caused secondary electrons to return to the phosphor scoring level. This induced a lateral blur and overdosing of the images that was related directly to the SSD or strength of the fringe field in the transverse direction (5% at 0.25 T, 10% at 1 T). Including 1 cm of water material below the phosphor layer significantly reduced the ERE and improved the dose image quality. Conclusion: Novel Monte Carlo simulations of the operation of an EPID working inside a bidirectional field MRI���linac have been performed. The main effect which induced an image or dose artifact was the ERE in the perpendicular field arrangement. This can however be almost eliminated by the use of an exit side bolus on the EPID. �� 2012, American Association of Physicists in Medicine. All rights reserved.