White dwarfs represent the last stage of evolution for low and intermediate-mass stars (below about 8 times the mass of our Sun), and like their stellar progenitors, they are often found in binaries. If the orbital period of the binary is short enough, energy losses from gravitational wave radiation can shrink the orbit until the two white dwarfs come into contact and merge. Depending on the masses of the coalescing white dwarfs, the merger can lead to a supernova of type Ia, or it can give birth to a massive white dwarf. In the latter case, the white dwarf remnant is expected to be highly magnetised due to the strong dynamo that may arise during the merger, and rapidly rotating due to conservation of the orbital angular momentum of the binary. Here we report the discovery of a white dwarf, ZTF J190132.9+145808.7, which presents all these properties, but to an extreme: a rotation period of 6.94 minutes, one of the shortest measured for an isolated white dwarf, a magnetic field ranging between 600 MG and 900 MG over its surface, one of the highest fields ever detected on a white dwarf, and a stellar radius of 1810 km, slightly larger than the radius of the Moon. Such a small radius implies the star's mass is the closest ever detected to the white dwarf maximum mass, or Chandrasekhar mass. In fact, as the white dwarf cools and its composition stratifies, it may become unstable and collapse due to electron capture, exploding into a thermonuclear supernova or collapsing into a neutron star. Neutron stars born in this fashion could account for 10% of their total population.