As, in the middle of the Heian Period, the system of shoden (to enter the court) commenced and the family lineage that can become kugyo (court nobility) were fixed since the insei period (during the period of the government by a retired Emperor), discrimination among kuge (court nobles) between toshoke for which shoden was allowed and jigeke for which shoden was not allowed was established.
平安時代中期に昇殿の制が始まったことと、公卿となることが出来る家柄が院政期から固定されるようになったことに伴い、公家の中で昇殿を許される家柄である堂上家と許されない地下家（じげけ）の区分が成立した。