Borrowed from Latin ērigere. Doublet of erguir, which was inherited. Compare English erect.
Practice speaking and memorizing "erigir" and many other words and sentences in Spanish.