A medical device for implantation in a hip joint of a patient is provided. The hip joint has 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. The elongated portion is adapted to be connected to a prosthetic spherical portion adapted to replace the caput femur. The prosthetic spherical portion in turn is adapted to be movably placed in a prosthetic replacement for the acetabulum comprising at least one extending portion adapted to clasp said prosthetic spherical portion. The 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. The restricting portion of the elongated portion is adapted to enable an advantageous motion range in relation to said prosthetic replacement for the acetabulum.