More than a quarter century ago, precisely in 1770 AD, approximately 2 km in the southern side of the village of Bengkel (now known as Beng village) built a new palace called Grya Anyar.
The Griya Anyar palace establishment or who later became Puri Agung Gianyar, which was inaugurated with a ceremony on 19 April 1771, has signaled the birth of a new kingdom, which is ruled by Ida Anak Agung I Dewa Manggis Api or also called I Dewa Manggis Sakti.
After being crowned as king, he holds the title I Dewa Manggis IV, as the first king of the Kingdom of Gianyar (Gianyar King I). The Puri Agung Gianyar as the king’s palace then became the center of the capital of the kingdom.
After I Dewa Manggis Sakti passed away as the founder of the kingdom of Gianyar that is fully sovereign, and then the heir of the throne passed to the crown prince (Ida I Dewa Manggis Di Madia) who holds the title I Dewa Manggis V as the King of Gianyar II.
Dewa Manggis V reigned in 1814-1839 AD. After he died, then replaced by the crown prince (Ida I Dewa Manggis Di Rangki) who holds the title I Dewa Manggis VI as the King of Gianyar III, who ruled from 1839 to 1847 AD.
The next heir to the throne as king of Gianyar is Ida I Dewa Manggis Mantuk Di Satria (I Dewa Manggis VII). He reigned as king of Gianyar IV long enough for 38 years from 1847 to 1885 AD, before being deceived and taken prisoner by Ida I Dewa Agung (King of Klungkung).
After Ida I Dewa Manggis VII was exiled in 1885, the throne in the palace of Gianyar been paralyzed until his death in 1892 AD in exile in Satria, Klungkung. Then the territory of the Royal Kingdom of Gianyar controlled by Bangli and Klungkung empire.
In January 1893, two sons of Ida I Dewa Manggis Mantuk Di Satria named Ida I Dewa Pahang and Ida I Dewa Gde Raka and together with their family managed to escape from exile and return to Gianyar.
Ida I Dewa Pahang as King Gianyar V had successfully managed to escape from detention of the troops of the Klungkung and the Bangli Kingdom. For three years (1893-1896) he struggled and managed to free the Gianyar Empire from the clutches and the rule of other kingdoms, so Gianyar kingdom has succeeded in taking back its sovereignty.
After Ida I Dewa Pahang died, then the throne followed by his younger brother named Ida I Dewa Gde Raka. He was crowned as King of Gianyar VI and ruled from 1896-1912.
Hostility and conflict endlessly with the kingdoms of Badung, Mengwi, Bangli and Klungkung led to a situation of life in the kingdom of Gianyar be chaotic. Highlight the suffering of its people and to seek protection in order to save the kingdom from collapse because it was threatened and assaulted by four neighboring kingdoms from various directions, then Ida I Dewa Gde Raka finally handed over sovereignty of the kingdom of Gianyar to the power of the Dutch East Indies.
Furthermore, Ida I Dewa Gde Raka (Ida I Dewa Manggis VIII), King of Gianyar VI, as stedehouder of Dutch East Indies government in Gianyar. Then on May 23, 1912, he resigned voluntarily. By the Decree of the Governor-General, dated January 11, 1913, Ida I Dewa Gde Raka dismissed with respect as stedehouder in the Kingdom of Gianyar Bali.
Ida I Dewa Ngurah Agung who is the son of Ida I Dewa Manggis VIII later succeeded his father in the kingdom of Gianyar and appointed as Regent for the Heads of Government in Gianyar and given the title “Anak Agoeng“. Furthermore, since July 1, 1938, the areas in Bali designated as autonomous regions (Swapraja), each headed by Zelfbestuurders. Ida Anak Agung Ngurah Agung as a King (zelfbestuurders) Gianyar, together with the kings of other autonomous regions in Bali inducted with honors in Besakih temple on June 29, 1938.
During the Japanese occupation in Gianyar which started on February 23, 1942, the kingdom is still led by King Gianyar, Ida Anak Agung Ngurah Agung. Then on August 23, 1943, his son who was named Ida Anak Agung Gede Agung was sworn in as king (Syutjo) Gianyar succeeded his father and ruled until the end of the Japanese population in 1945.
Entering the independence and periods of residence allied soldiers and NICA (Netherlands-Indies Civil Administration), Gianyar kingdom under the leadership of King Ida Anak Agung Gede Agung remains as an autonomous region/part of the government of Bali. Bali itself becomes part of the administration of the State of East Indonesia (Negara Indonesia Timur (NIT) ), while the NIT is a part of the Republic of Indonesia States (Republik Indonesia Serikat (RIS) ).
With the formation of the Unitary Republic of Indonesia (Negara Kesatuan Republik Indonesia (NKRI) ) on August 17, 1950, the government made changes to the system. The former territory of the kingdom in Bali, amounting to 8 kingdoms serve as regional parts/autonomous regions.
The autonomous regional government composed of the Chairman of the Board of Local Government and the Regional House of Representatives (which has full parliamentary rights). The Regional Representatives Council who have been inducted, then in charge of selecting the Chairman of the Board of the autonomous regional government of Gianyar, and then Ida Anak Agung Gde Oka is selected for the period 1953-1958.
After the issuance of Regulations No. 69 of 1958 about the establishment of the Autonomous Region Level II, where the executive power is run by a Head of the Autonomous Region (Swatantra), and then Ida Anak Agung Gde Oka re-elected as the Head of Regional Level II of Gianyar with the service period 1958-1960.