The present invention provides a method for preparing poly(allylamine) hydrochloride, sevelamer hydrochloride, sevelamer carbonate and colesevelam hydrochloride. The present invention also relates to a process for preparing oly(allylamine) hydrochloride, sevelamer hydrochloride, sevelamer carbonate and colesevelam hydrochloride with low allylamine content and high specific gravity.