A medical device for implantation in a hip joint of a patient; the hip joint having a caput femur integrated with a collum femur having a collum and caput center axis, extending longitudinal along the collum and caput femur, in the center thereof. The medical device comprises an elongated portion adapted to at least partially replace the collum femur, wherein said elongated portion is adapted to be at least one of integrated in and connected to a prosthetic spherical portion adapted to replace the caput femur, and wherein said prosthetic spherical portion in turn is adapted to be movably placed in a prosthetic replacement for the acetabulum having at least one extending portion for clasping said prosthetic spherical portion. Said elongated portion comprises a restricting portion adapted to restrict the motion range of the spherical portion in relation to said prosthetic replacement for the acetabulum. Said restricting portion of said elongated portion comprises at least one recess adapted to receive a portion of said prosthetic artificial acetabulum, when implanted, to enable an advantageous motion range in relation to said prosthetic replacement for the acetabulum.