Dainagon

 was a counselor of the first rank in the Imperial court of Japan. The role dates from the 7th century.
This advisory position remained a part of the Imperial court from the 8th century until the Meiji period in the 19th century.
The post was created in 702 by the Taihō Code, and evolved out of the earlier post "Oimonomōsu-tsukasa". Holders of the office were of the Senior Third Rank. They assisted the Minister of the Left (the "Sadaijin") and the Minister of the Right (the "Udaijin").
By the mid-17th century, the "Dainagon" counselor or state, was expected to work closely the "Minister of the Center" (the "Naidaijin"), whose position ranked just below the "Udaijin" and the "Sadaijin." This court position evolved to ensure that someone will be always prepared to replace or assist the main court officials if, for any reason, it should be impossible for one of the two senior counselors to devote himself to his duties and responsibilities in all matters.
The "Dainagon" ranked just above all other "kuge" in the "kugyō" except the "Daijō-daijin", "Udaijin," "Sadaijin," and "Naidaijin."
This ancient office would have been roughly equivalent to that of vice-minister in the modern cabinet system. It was abolished in 1871.
Dainagon in context.
Any exercise of meaningful powers of court officials in the pre-Meiji period reached its nadir during the years of the Tokugawa shogunate, and yet the core structures of ritsuryō government did manage to endure for centuries.
In order to appreciate the office of "Dainagon", it is necessary to evaluate its role in the traditional Japanese context of a durable yet flexible framework. In this bureaucratic network and a hierarchy of functionaries, the "Dainagon" functioned like mouthpieces to and from the board, and in consultation with the board.
The role of "Dainagon" was an important element in the "Daijō-kan" (Council of State). The Daijō-kan schema proved to be adaptable in the creation of constitutional government in the modern period.
Highest Daijō-kan officials.
The highest positions in the court hierarchy can be cataloged. A dry list provides a superficial glimpse inside the complexity and inter-connected relationships of the Imperial court structure.
The next highest tier of officials were:
Other high-ranking bureaucrats who function somewhat flexibly within the "Daijō-kan" were; 
The Eight Ministries.
The government ministries were eight semi-independent bureaucracies. A list alone cannot reveal much about the actual functioning of the "Daijō-kan", but the broad hierarchical categories do suggest the way in which governmental functions were parsed:
The specific ministries above are not grouped arbitrarily. The two court officials below had responsibility for them as follows: