A method for producing a functionally graded material by forming a gradient material composed of at least 4 layers, wherein one layer essentially comprises 100 wt% biocompatible wear resistant metal or metal alloy, and the other layers each essentially comprise a powder of a biocompatible wear resistant metal or metal alloy, together with a powder of a bioactive material, or the bioactive material only, wherein each of the layers differ in the ratio between wear resistant metal or metal alloy and bioactive material and consolidating the gradient material by using a sintering technique wherein the layer with essentially 100 wt% metal or metal alloy has a relative density of at least about 95 % of the theoretical density. The obtained material may be used in an implant eg. in a knee.