Rarest of results sees St Andrew’s advance