The ACTOMgSO4 was a randomized clinical trial conducted in 16 centers in Australia and New Zealand , comparing magnesium sulfate with placebo given to pregnant women ( n = 535 magnesium ; n = 527 placebo ) for whom imminent birth was planned or expected before 30 weeks ' gestation .