The invention relates to solid pharmaceutical compositions comprising a solid dispersion of an organic acid in xylitol and at least one therapeutically active ingredient selected from a magnesium or calcium salt. The pharmaceutical compositions may be formulated as oral granules. The invention also provides a method for the preparation of a pharmaceutical composition comprising a basic active ingredient and an organic acid.