Borrowed from (Medieval) Latin basilica, from Ancient Greek βασιλική (basilikḗ, “royal”), from βασιλεύς (basileús, “king”).
Practice speaking and memorizing "basílica" and many other words and sentences in Spanish.