This trial is a three-period, multicenter, safety and efficacy clinical trial. The first period is a two-week Washout Period, the second period is a 52-week randomized, open-label, active control Safety Assessment Period, and the third period is a four-week, randomized, open-label, placebo-controlled Efficacy Assessment Period in only the patients who were randomized to treatment with ferric citrate during the Safety Assessment Period. The primary objectives of this trial are to determine the long-term safety over 52 weeks of up to twelve (12) caplets/day of KRX-0502 (ferric citrate) in patients with ESRD undergoing either hemodialysis or peritoneal dialysis and to determine the efficacy of KRX-0502 (ferric citrate) in the four-week, randomized, open-label, placebo-controlled Efficacy Assessment Period.