is the collective term for the most important officials attached to the court of the Emperor of Japan in pre-Meiji eras. The term generally referred to the and court officials and denoted a court rank between First Rank and Third Rank under the Ritsuryà  system, as opposed to the lower court nobility, thus being the collective term for the upper court nobility. However, later on some holders of the Fourth Rank were also included.
In 1869, following the Meiji Restoration, the court nobility and daimyo were merged into a new peerage, the kazoku.
The kugyà  generally refers to two groups of court officials:
The kugyà  originated from the Three Lords and Nine Ministers (ä¸Âå ¬ä¹Âå¿) of the ancient Chinese Qin dynasty (221 BC â 206 BC).
In Japan, the kugyà  was similarly divided into two groups of court officials the three Kà  and the nine Kei. The Kà  comprised the Chancellor of the Realm (Taishi or Daijà Â-daijin), the Minister of the Left (Taifu or Sadaijin), and the Minister of the Right (Taiho or Udaijin); and the Kei comprised the Associate Counselors (Shà Âshi, Shà Âfu, Shà Âho, Chà Âsai, Shito, Sà Âhaku, Shiba, Shikà Â, and Shikà «, or collectively the Sangi), who held the court rank of Third Rank or higher.
Under the Ritsuryà  system, the kugyà  included the three Ministers (Daijin), the Chancellor of the Realm, the Minister of the Left, and the Minister of the Right, and the Major Counsellor (Gyoshitaifu or Dainagon), who held the court rank of Third Rank or higher. However, later on government offices not specified in the administrative code of the ritsuryà Â, the Regent (Sesshà  and Kampaku), the Inner Minister (Naidaijin), the Middle Counsellor (Chà «nagon), and Associate Counselors holding the Fourth Rank were also included in the kugyà Â.
The kugyà  was also divided into the incumbent courtiers (Gennin) and courtiers without a post (Sani). Additionally, among the courtiers without a post, the courtiers who had at least once held a position of Associate Counselor or higher were referred to as e.g. former Major Counsellor (saki no Dainagon), but courtiers holding a court rank of Third Rank or higher who had never been Associate Counselor were referred to as non-Associate Counselor (Hisangi).
In 758, the Chancellor of the Realm was renamed Taishi from Daijà Â-daijin, the Minister of the Left was renamed Taifu from Sadaijin, the Minister of the Right was renamed Taiho from Udaijin, and the Major Counsellor was renamed Gyoshitaifu from Dainagon. However, after the death of Fujiwara no Nakamaro in 764, the old names were restored.
As part of the Meiji reforms, a single aristocratic class, the kazoku, was created in 1869 by merging the kuge (the court nobility in Kyoto, of which the kugyà  was a part) and the daimyà Âs (the feudal land holders and warriors). In the 1870s, the organizational structure of the court itself was also modernized.
In the period after the Second World War, the kazoku was abolished, as a part of post-war Japanese reforms. The remaining political powers of the Emperor were transferred to the constitutional government of Japan, and the responsibility for state matters concerning the Emperor and the Imperial family was consolidated entirely into the Imperial Household Agency.
The kugyà  was also known as kandachime (ä¸ÂéÂÂé¨), keishà  (å¿ç¸), gekkei (æÂÂå¿), and kyokuro or odoronomichi (æ£Âè·¯).
While kugyà  was the collective term for the holders of a court rank between First Rank and Third Rank, the term for the holders of Fourth Rank and Fifth Rank was Taifu.