Sutawijaya, also known as Panembahan Senopati, stylized name as Senopati ing Alaga Sayiddin Kalifatullah Tanah Jawi (1584-1601) was the first king of the Mataram Sultanate Kingdom. He was the son of Ki Ageng Pemanahan, one of Hadiwidjaja (Joko Tingkir), the Duke of Pajang's retainer and loyal servant, and then adopted by the Duke as his son. He was noted for killing the main opposition to the Duke, Prince Arya Penangsang of Jipang-Panola, the last descendant of Demak sultanate, thus gaining victory for his godfather's Pajang kingdom. Both him and his father were granted the dukedom of Mataram, which then grew to a new sovereign kingdom and a dynasty that lasts until recent days.
During his reign the kingdom still used Javanese traditions, though the Islam already was introduced to Java. It was the Javanese Muslim state of Pajang (and the ancient Hindu-Javanese kingdom of Mataram, still on the same site) that got in trouble when Panembahan Senopati schemed to undermine the authority of the King of Pajang. Senopati had conquered the Mataram district himself and c. 1576 he conquered the area of Pajang, imposed the new religion and established his own court. The Mataram ruler refused to embrace the Islam and many historiographical problems surrounded Senopati's reign. Like he concentrated his spiritual powers through meditation and ascetism. So Senopati's reliance upon both Sunan Kalijaga and Nyai Loro Kidul in the chronicles accounts nicely reflects the Mataram Dynasty's ambivalence towards Islam and indigenous Javanese beliefs. The straight line between Mount Merapi at the north and the southern sea, with the Mataram kingdom at the center was s strong concept of cosmology among the Javanese.
His grandson Sultan Agung (the Great Sultan, 1613 - 1645) was described as a great Muslim ruler and who was claimed as the greatest of Mataram's rulers. Though both (Senopati and Sultan Agung) established a liaison with the Goddess of the Southern Ocean of Nyai Loro Kidul. [1]