A medical implant comprises a biodegradable magnesium-based alloy of which at least a part of its surface layer comprises a magnesium carbonate. A method for the manufacture of a biocompatible, corrosion-inhibiting protective surface layer on a medical implant comprising a magnesium-based alloy, comprises: providing an implant comprising a magnesium-based alloy to be coated; placing the implant into a reactor chamber; exposing at least part of the surface of said implant to an atmosphere comprising humid carbon dioxide to produce a coating on the surface of the implant comprising a magnesium carbonate of the formula x MgCO3 · y Mg (OH)2, whereby x + y = 1; removing the implant from the reactor chamber; and drying the surface of the implant.L'invention concerne un implant médical qui comporte un alliage biodégradable à base de magnésium et dont au moins une partie de la couche de surface comporte un carbonate de magnésium. L'invention concerne également un procédé de fabrication d'une couche de surface de protection, biocompatible et inhibant la corrosion, sur un implant médical comportant un alliage à base de magnésium, ledit procédé consistant : à utiliser un implant comportant un alliage à base de magnésium devant être revêtu ; à placer l'implant dans une chambre de réacteur ; à exposer au moins une partie de la surface dudit implant à une atmosphère comportant du dioxyde de carbone humide afin d'obtenir un revêtement sur la surface de l'implant comportant un carbonate de magnésium de la formule x MgCO3 • y Mg(OH)2, où x + y = 1 ; à retirer l'implant de la chambre de réacteur et à sécher la surface de l'implant.