A pharmaceutical composition comprising amorphous magnesium polyphosphate (Mg-PolyP) microparticles produced by dissolving a polyphosphate salt in aqueous medium, adding an aqueous solution of a magnesium salt and collecting and drying the particles formed after washing with alcohol. A pharmaceutical composition comprising Mg-PolyP microparticles and hyaluronic acid produced by mixing an aqueous solution of a polyphosphate salt with an aqueous solution of hyaluronic acid, adding a soluble magnesium salt and allowing the mixture to gelatinate is also provided. The poly phosphate salt may be sodium polyphosphate. The method may further comprise adding an insoluble calcium salt prior to the addition of magnesium thus forming a hyaluronic acid-magnesium/calcium-polyphosphate paste which is cartilage-like. The compositions may be used in the regeneration and repair of cartilage, as a bonding material for cartilage or bone and in the prevention and/or treatment of joint dysfunctions and osteoarthritis. The composition may scavenge synovial fluid calcium ions which are implicated in crystal formation and may promote the adhesion of chondrocytes and upregulate the expression of the chondrocyte marker genes encoding alkaline phosphatase, collagen type 3A1, aggrecan and Sox9.