Abstract. We have used Mars Express (MEX) and MarsGlobal Surveyor (MGS) simultaneous and non-simultaneous measurements to study the Martian plasma environment. In particular, we have derived quantitative expressions for the altitude of the terminator bow shock (BS) and magnetic pileup boundary (MPB) as functions of solar wind dynamic pressure, crustal magnetic fields and solar EUV flux. We have also studied the influence of the interplanetary magnetic field (IMF) direction. Through simultaneous two-spacecraft case studies we have shown that the dynamic pressure has a strong influence on the location and shape of these boundaries, which is also confirmed through a large statistical study. A higher dynamic pressure pushes the boundaries downward. The IMF direction has a weaker but still significant influence on both boundaries and causes them to move outward in the hemisphere of locally upward electric field. However, the MPB in the Southern Hemisphere is found to actually move inward when the electric field is directed locally upward. The crustal magnetic fields in the Southern Hemisphere have a strong influence on the MPB and cause it to move to higher altitudes over strong crustal magnetic fields. The influence of the crustal magnetic fields on the BS is more ambiguous since there are few crossings over the strongest crustal fields, but there appears to be at least a small trend of a higher BS for stronger crustal fields. An increased solar EUV flux has been found to cause the BS to move outward and the MPB to move inward.