The most prominent feature on the surface of Mars is the near-hemispheric dichotomy between the southern highlands and northern lowlands. The root of this dichotomy is a change in crustal thickness along an apparently irregular boundary, which can be traced around the planet, except where it is presumably buried beneath the Tharsis volcanic rise. The isostatic compensation of these distinct provinces and the ancient population of impact craters buried beneath the young lowlands surface suggest that the dichotomy is one of the most ancient features on the planet. However, the origin of this dichotomy has remained uncertain, with little evidence to distinguish between the suggested causes: a giant impact or mantle convection/overturn. Here we use the gravity and topography of Mars to constrain the location of the dichotomy boundary beneath Tharsis, taking advantage of the different modes of compensation for Tharsis and the dichotomy to separate their effects. We find that the dichotomy boundary along its entire path around the planet is accurately fitted by an ellipse measuring approximately 10,600 by 8,500 km, centred at 67 degrees N, 208 degrees E. We suggest that the elliptical nature of the crustal dichotomy is most simply explained by a giant impact, representing the largest such structure thus far identified in the Solar System.