A method for production of phosphate compounds comprises dissolving of a raw material comprising phosphorus, aluminium and iron, in a mineral acid. Insoluble residues from the dissolving step are separated. Iron hydroxide is added causing precipitation of phosphate compounds. The precipitated phosphate compounds are removed. The phosphate compounds are dissolved by an alkaline solution. Iron hydroxide is filtered out. Lime is added, causing precipitation of calcium phosphate. The precipitated calcium phosphate is separated. The leach solution after the separating of precipitated calcium phosphate is recycled to be used for dissolving phosphate compounds by an alkaline solution.