The endoprosthesis has a support element (10) e.g. grid, partially consisting of a metallic material, and a functional element (30) embedded into the support element or fastened to the support element. The functional element partially comprises a radio-opaque and/or x-ray opaque material (31), which comprises different material compositions with a material of the support element in a part of volume. The functional element is provided with a barrier layer (32). The radio-opaque and/or x-ray opaque material is electrically insulated against the support element by the barrier layer. The barrier layer comprises a material e.g. silicone and titanium oxide.