We investigate the spatial extent and structure of the Pegasus dwarf irregular galaxy (PegDIG) using deep, wide-field, multicolour CCD photometry from the Sloan Digital Sky Survey (SDSS) and new deep H i observations. We study an area of ∼0.6 deg2 centred on the Pegasus dwarf that was imaged by the SDSS. Using effective filtering in colour-magnitude space, we reduce the contamination by foreground Galactic field stars and significantly increase the contrast in the outer regions of the Pegasus dwarf. Our extended surface photometry reaches down to a surface brightness magnitude μr ≃ 32 mag arcsec-2. It reveals a stellar body with a diameter of ∼8 kpc that follows a Sérsic surface brightness distribution law, which is composed of a significantly older stellar population than that observed in the ∼2 kpc main body. The galaxy is at least five times more extended than listed in the NASAIPAC Extragalactic Database. The faint extensions of the galaxy are not equally distributed around its circumference; the north-west end is more jagged than the south-east end. We also identified a number of stellar concentrations, possibly stellar associations, arranged in a ring around the main luminous body. New H i observations were collected at the Arecibo Observatory as part of the Arecibo Legacy Fast ALFA survey. They reveal an H i distribution somewhat elongated in RA and about wide, with the region of highest column density coincident with the luminous galaxy. The H i rotation curve shows a solid-body rotation behaviour, with opposite ends differing by 15 km s-1. There is a stream to lower velocities about 5 arcmin from the centre of the galaxy. We were able to measure ugriz colours in a number of apertures using the SDSS data and compared these with predictions of evolutionary synthesis models. The results indicate that the outermost regions of the PegDIG are 5-10 Gyr old, while the inner kpc contains stars ∼1 Gyr old and younger. The colours correspond to K stars; earlier subclasses are located in the innermost parts of the galaxy. The PegDIG appears to be a relatively low-mass object, with a total dynamical mass of 3 × 108 M⊙ of which only 30 per cent in stars and 2 per cent is in neutral gas. The extended stellar distribution, the appearance of faint-light extensions and the lack of low column density H i tails rule out a possible tidal origin or a ram pressure stripping scenario. We propose that the PegDIG is a fairly recent acquisition by the Local Group, since it does not appear to be disturbed by interactions with other galaxies.