The tidal disruption of a solar-mass star around a supermassive black hole has been extensively studied analytically and numerically. In these events, the star develops into an elongated banana-shaped structure. After completing an eccentric orbit, the bound debris falls into the black hole, forming an accretion disk and emitting radiation. The same process may occur on planetary scales if a minor body passes too close to its star. In the Solar System, comets fall directly into our Sun or onto planets. If the star is a compact object, the minor body can become tidally disrupted. Indeed, one of the first mechanisms invoked to produce strong gamma-ray emission involved accretion of comets onto neutron stars in our Galaxy. Here we report that the peculiarities of the 'Christmas' gamma-ray burst (GRB 101225A) can be explained by a tidal disruption event of a minor body around an isolated Galactic neutron star. This would indicate either that minor bodies can be captured by compact stellar remnants more frequently than occurs in the Solar System or that minor-body formation is relatively easy around millisecond radio pulsars. A peculiar supernova associated with a gamma-ray burst provides an alternative explanation.