Uji (氏?) are Japanese kin groups of the Kofun period.
Uji were similar to the traditional Japanese clans; however, the pre-Taika uji did not have many of the characteristics which are commonly understood to be part of Japanese clans. For example, the Nakatomi clan and the Fujiwara clan were each uji.
The uji was not only a social, economic and political unit. It also had religious significance in the 5th-7th centuries. The chief family has the title of Uji no kami.
The Uji formed a decentralized ruling structure.
According to Chinese records, the clans divided in rising urban centers occupied the Yamato Plains (region between the present-day cities of Nara and Osaka). The clans were responsible for the protection and the taxation of these independent territories. Each clan was ruled by a headman or warlord and worshiped its own unique Ujigami or clan spirit. The most thorough ancient description of the Uji clan system comes from early Chinese records during the Kofun or Tomb period ( 300-552 CE) .
As pointed out in the History of Wei, the peace was preserved among the Wa people as long as a queen, who was a member of the powerful Yamato clan, played the role of mediator between the various clans. Since pre-classical Japan lacked a centralized government, an official language and a written body of laws, the Shinto religious beliefs determined the hereditary lineage of the Uji members.
The powerful Yamato clan, the Japanese Imperial family, consolidated its power during the late sixth and early seventh century, Prince Shotoku, created the Seventeen Article Constitution in 604 CE. This constitution did not constitute an official legal text but it was an attempt to create a bureaucracy to undercut the political domination of the great clans.