Sri Susuhunan Pakubuwana IV, commonly known as Pakubuwana IV or PB IV, had the real name Raden Mas Subadya. He is the son of Pakubuwana III and consort of GKR. Kencana, a descendant of the Sultan of Demak. He was born on September 2, 1768. Raden Mas Subadya ascended the throne on September 29, 1788, six days after the death of Pakubuwono III. After that, he took the title Sri Susuhunan Pakubuwono IV and officially became the third king of the Surakarta Sunanate. Pakubuwono IV was also known as Sunan Bagus, because he ascended the throne at a young age (20 years) and was handsome.

Pakubuwana IV was a Surakarta aristocrat who was full of ambition and courage, in contrast to his less capable father. He is a devout Muslim and raised the scholars in the government. This, of course, was opposed by the officials with mystical tendencies who were already established in the palace. The ulama supported Pakubuwana IV to be free from the VOC and make Surakarta the most important country in Java, defeating Yogyakarta. 

The Pakepung event occurred in November 1790, just two years after Pakubuwono IV ascended the throne. Pakepung was the incident of the siege of the Surakarta Palace by the VOC alliance, Hamengkubuwono I of the Sultanate of Yogyakarta, and Mangkunegara I of the Duchy of Mangkunegaran. The three parties cooperated because they both thought that Pakubuwono IV’s leadership style could jeopardize their position. Not only that, Pakubuwono IV also came under pressure from within his own palace, which demanded that his spiritual advisors be removed immediately. On November 26, 1790, Pakubuwono IV finally admitted defeat and handed over his advisors for exile.

On the initiative of the VOC, Pakubuwana IV, Hamengkubuwana I, and Mangkunegara I jointly signed an agreement which affirmed that the sovereignty of Surakarta, Yogyakarta, and Mangkunegaran were equal and they were forbidden to conquer each other. Nevertheless, Pakubuwana IV still harbored the ambition to return Yogyakarta to Surakarta. However, his ambition could not be realized because some of his attempts failed.

In the Serat Babad Pakepung written by Yosodipuro II, the poet of the Kartasura Palace, Pakubuwono IV is told as a clever strategist and literary expert, especially the spiritual one. In addition, Pakubuwono IV is believed to be the author of Serat Wulangreh, which contains noble teachings to improve the morals of the Javanese nobility. Even Ronggowarsito, a well-known poet of the Surakarta Palace, during his youth had studied several superior sciences from Pakubuwono IV. Pakubuwono IV ruled until the end of his life on October 2, 1820. After that, his body was buried in the Kedhaton Besiyaran, Yogyakarta.