Portable electronic device case comprising a front panel and a rear panel which are arranged to receive a mobile electronic device (13; 113) through an opening, and a locking mechanism (7; 107) arranged to secure said opening, said locking mechanism (7; 107) comprises a male connector (15; 115) having an engagement portion (17; 117), said male connector (15; 115) being connected to said front panel, a female connector (19; 119) having an axial opening (21; 121) configured to receive the engagement portion (17; 117) of said male connector (15; 115), said female connector (19; 119) being connected to a foldable portion of said rear panel, a first magnetic locking element (31; 131) which is received in a first locking element cavity (39; 139) formed in said female connector (19; 119), said first locking element cavity, or a side wall of said first locking element cavity, extending in a direction which forms an angle (α) with the axial direction of said axial opening (21; 121), wherein said first locking element (31; 131) is movable in said first locking element cavity (39; 139) between a locking position, to which it is biased by a resilient element (33; 133) and in which it is arranged to engage the engagement portion (17, 51; 117, 151) of the male connector (15; 115) to prevent the male connector (15; 115) from being retracted from the female connector (19; 119), and a non-locking position in which it allows the engagement portion (17; 117) of the male connector (15; 115) to be retracted from the female connector (19; 119), characterized in that said locking mechanism (7; 107) comprises at least one further magnetic locking element which is received in said first locking element cavity or in a further locking element cavity formed in said female connector and extending in a direction that forms an angle with the axial direction of said axial opening (21; 121), wherein each of said panels comprises an electromagnetic shielding layer (127, 128), at least one of which extends beyond the front panel as seen in a direction from said male connector towards said female connector when the rear panel is situated in an unfolded configuration, and a base portion of said male connector is arranged between said electromagnetic shielding layer of the front panel and an outer layer of the front panel. a male connector (15; 115) having an engagement portion (17; 117), said male connector (15; 115) being connected to said front panel, a female connector (19; 119) having an axial opening (21; 121) configured to receive the engagement portion (17; 117) of said male connector (15; 115), said female connector (19; 119) being connected to a foldable portion of said rear panel, a first magnetic locking element (31; 131) which is received in a first locking element cavity (39; 139) formed in said female connector (19; 119), said first locking element cavity, or a side wall of said first locking element cavity, extending in a direction which forms an angle (α) with the axial direction of said axial opening (21; 121), wherein said first locking element (31; 131) is movable in said first locking element cavity (39; 139) between a locking position, to which it is biased by a resilient element (33; 133) and in which it is arranged to engage the engagement portion (17, 51; 117, 151) of the male connector (15; 115) to prevent the male connector (15; 115) from being retracted from the female connector (19; 119), and a non-locking position in which it allows the engagement portion (17; 117) of the male connector (15; 115) to be retracted from the female connector (19; 119), characterized in that said locking mechanism (7; 107) comprises at least one further magnetic locking element which is received in said first locking element cavity or in a further locking element cavity formed in said female connector and extending in a direction that forms an angle with the axial direction of said axial opening (21; 121), wherein each of said panels comprises an electromagnetic shielding layer (127, 128), at least one of which extends beyond the front panel as seen in a direction from said male connector towards said female connector when the rear panel is situated in an unfolded configuration, and a base portion of said male connector is arranged between said electromagnetic shielding layer of the front panel and an outer layer of the front panel.