During the reign of the Wanli Emperor of the Ming dynasty, it housed relatives of the emperor who had been exiled because they were potential claimants of the imperial throne, members of the imperial family constituting about one quarter of the city's population; as a result of this, Matteo Ricci came here when trying to gain entry to Beijing.[12]