A magnetic fastening device for releasably fastening a first unit and a second unit to each other, said first unit having a first unit abutment surface , and said second unit having a second unit abutment surface , said first unit abutment surface and said second unit abutment surface being adapted for abutment against each other, and said magnetic fastening device further comprising at least one pair of magnets , a first magnet of said pair of magnets being allocated to the first abutment surface , and a second magnet of said pair of magnets being allocated to the second abutment surface , said first magnet and said second magnet exerting an attractive force (F) to each other, characterized in that a first abutment surface of said first unit abutment surface and said second unit abutment surface is provided with at least one protrusion , wherein a second abutment surface of said first unit abutment surface and said second unit abutment surface is provided with at least one recess , said at least one recess being adapted to receive said at least one protrusion , and wherein said first magnet and said second magnet are displaced relative to each other by a displacement distance (d) in a displacement direction (D) extending parallel to the extension of said first abutment surface and said second abutment surface at the location of said protrusion and said recess such that, in a state in which said first abutment surface abuts against said second abutment surface and said at least one protrusion is received in said at least one recess , a component (Fo) of said attractive force (F) extending parallel to said first abutment surface and said second abutment surface maintains said at least one protrusion in said at least one recess . said first unit having a first unit abutment surface , and said second unit having a second unit abutment surface , said first unit abutment surface and said second unit abutment surface being adapted for abutment against each other, and said magnetic fastening device further comprising at least one pair of magnets , a first magnet of said pair of magnets being allocated to the first abutment surface , and a second magnet of said pair of magnets being allocated to the second abutment surface , said first magnet and said second magnet exerting an attractive force (F) to each other, characterized in that a first abutment surface of said first unit abutment surface and said second unit abutment surface is provided with at least one protrusion , wherein a second abutment surface of said first unit abutment surface and said second unit abutment surface is provided with at least one recess , said at least one recess being adapted to receive said at least one protrusion , and wherein said first magnet and said second magnet are displaced relative to each other by a displacement distance (d) in a displacement direction (D) extending parallel to the extension of said first abutment surface and said second abutment surface at the location of said protrusion and said recess such that, in a state in which said first abutment surface abuts against said second abutment surface and said at least one protrusion is received in said at least one recess , a component (Fo) of said attractive force (F) extending parallel to said first abutment surface and said second abutment surface maintains said at least one protrusion in said at least one recess . <EOS>