Acute renal failure (ARF) is a serious and common complication in hospitalized patients, occurring in more than 25% of intensive care unit (ICU) patients. Hypomagnesemia is a common disorder, occurring in approximately 12% of hospitalized patients, with an incidence of 60% in ICU patients. The majority of those patients have are asymptomatic hypomagnesemia, and patients with mild hypomagnesemia do not need treatment, only the correction of the underlying cause. Hypomagnesemia potentiates postischemic renal failure in rats, and is associated, in humans, with acute renal failure. To date, there is no study that demonstrated a benefit of maintain normal levels of magnesium in the incidence of ARF in critically ill patients. Thus, we suggest that a treatment aimed to maintain normal magnesium levels during ICU stay can decrease the incidence of ARF. We will perform a randomized clinical trial that will include all patients admitted to an ICU that, develop hypomagnesemia. It will be excluded from the study: patients younger than 18 years, participants from other studies, pregnant women, patients with creatinine greater than or equal to 3.5 mg / dl or on dialysis, patients who used intravenous contrast for radiological studies, patients weighing less than 40kg, suffering from advanced malignant disease, with severe hypomagnesemia (serum magnesium less than or equal to 1.1 mg / dl), with a diagnosis of Torsades de Pointes or symptomatic hypomagnesemia prior to randomization. Patients included in the study will be randomized to one of the following groups: placebo (saline solution 0.9%) or 50% Magnesium Sulfate. Patients will receive an administration of 48 mEq Magnesium diluted in 250 ml saline 0.9% for 24 hours in an infusion rate of 10.4 ml / hr. Therapy will be continued for 3 days, and repeated during ICU stay to maintain magnesium levels in the normal range. Placebo group will receive exactly the same infusion only with saline administration. The therapy will be discontinued if the patient has hypermagnesemia or signs of magnesium intoxication. The main outcome measurement will be the occurrence of ARF during ICU stay.