Utaryo (Bureau of Traditional Music) was an organization belonging to the Jibusho (the ministry of civil administration) under the Ritsuryo system (a system of centralized government based on the ritsuryo code). It was referred to as Utamai no tsukasa in "Wamyo Ruijusho" (dictionary of Japanese names).
Its duty was to play gagaku (ancient Japanese court dance and music which was introduced from China to Japan) at various public events and to train gagaku players. Players were divided into groups of utanoshi (poet), mainoshi (dancer), fuenoshi (flute player) and gakushi (musician). The former three groups played yamatogaku (ancient Japanese music) (pre-existing music) and the latter group played gagaku (foreign music). Gakushis (musicians) were divided into groups of Tang, Silla, Goryeo (Goguryeo), Paekche and gigaku and kurezutsumi which were kuregaku, the music in Wo, and they played each music under the Ritsuryo system. A fueko (flute craftsman) was assigned to fuenoshi (flute player). After the Heian period, Utaryo declined, hit by the gakuso (chamber of music) or the Outadokoro (an organization that provided the education and management for ancient Japanese music, Uta, and traditional instruments).
After the Meiji Restoration, with some bumps and detours such as being integrated into the gakuso, Utaryo was reorganized into Shikibushoku Gakubu (Music Department of Imperial Household Agency) in 1908 and was taken over by the present Imperial Household Agency as it was. Hiromori HAYASHI, the composer of Kimigayo (Japan's national anthem) and Hideki TOGI, a gagaku performing musician, are from this Shikibushoku Gakubu.