Court orders 3-phase election