The term 廟 is primarily used for the temples of traditional deities who rank fairly low in the celestial hierarchy. The temples of higher-ranking gods, such as Mazu after her elevation to the "Queen of Heaven" by the Qing dynasty, are usually known as 宮／宫 (gōng, “palace”).