Stop 6 of 9

Kauman Great Mosque

Masjid Gedhe Kauman

One dispute over lines on a floor explains how precise calculation collided with the court's religious order.

20 min
Kauman Great Mosque with a three-tiered roof.
Aisha Tanduk · CC BY-SA 4.0; cropped/resized for app; ShareAlike applies
123456789

0 of 9 done

Audio guide · recorded voiceListen to the place’s story

Look around first

What to notice

  • Main prayer hall
  • Walls facing west
  • Rows of worshippers turned northwest

The story of the place

Text size

The main prayer hall is arranged so that its walls face due west, although Mecca lies noticeably farther north from here. Inside, this difference is visible in the safs: the rows of worshippers run across the room and are turned northwest. In a single hall, the old direction of the walls and the different arrangement by which people now stand to pray have both been preserved.

The mosque was built in seventeen seventy-three by order of Sultan Hamengkubuwono I. It is the principal congregational mosque of the Yogyakarta Sultanate: communal Friday prayer was held here, court religious ceremonies took place here, and cases involving marriage, inheritance, and other matters of Islamic law were heard on the veranda. Mosque officials lived nearby with their families. They were called kaum—people responsible for religion and the mosque—and this is where the name Kauman comes from.

In the late nineteenth century, one of these officials was Ahmad Dahlan, a Friday preacher who sought to have the direction of prayer determined by precise calculation. For his service at the mosque, he received seven guilders a month from the sultan's treasury and also traded in batik. The position gave him a place among the court theologians, while his dispute with them put both that position and his salary at risk.

The mosque was oriented due west. In Java, people had long believed that this was enough for prayer in the direction of Mecca. Dahlan studied astronomical calculation and checked the direction using a map and a compass. It turned out that from Yogyakarta, the Kaaba lies approximately twenty-four degrees north of due west. There was no need to rebuild the walls: it was enough to turn the rows of worshippers inside the hall.

In eighteen ninety-eight, Dahlan invited seventeen theologians to a family prayer room nearby. He showed them a map and a compass; his opponents referred to old books and the order established by earlier generations. The discussion continued until dawn and ended without an agreement.

Teenagers from Kauman listened to the dispute behind the prayer room's wall. They accepted Dahlan's calculation and, a few days later, brought it directly into the Kauman Great Mosque: they drew diagonal lines in chalk on the floor, pointing northwest. This was how they intended to turn the rows during the next prayer.

The mosque was managed by the chief court theologian, Kyai Haji Khalil Kamaludiningrat. He ordered the lines erased immediately and the culprits found. Because the angle matched Dahlan's calculation, suspicion fell on the preacher. Dahlan went to Khalil himself and explained that he had sent no one. The investigation found the teenagers: they confirmed that they had acted of their own accord.

The chalk lines disappeared, but Dahlan continued to explain his calculation to the congregation. For disobeying the chief theologian, he was stripped of his position as preacher at this mosque. His opponents then destroyed his small prayer room, which was already oriented northwest. Dahlan planned to leave Kauman; his relatives persuaded him to stay. He kept his batik trade, continued teaching his students, and later founded the religious and educational association Muhammadiyah here.

Nothing remains of the teenagers' white lines. The walls of the main prayer hall still face due west, but the rows of worshippers—the safs—run across the room, turned approximately twenty-four degrees north. People stand in precisely the direction that Khalil Kamaludiningrat once ordered erased from the floor.

Useful on site

Time at the stop20 min
Next stopTaman Sari
Entranceon site

An active mosque with no published visitor schedule; the courtyard and exterior are accessible outside worship services, while entry inside is only with permission on site.

Checked: June 24, 2026. Check the official source before visiting.

Remember that this is an active mosque: remove your shoes, speak quietly, and do not disturb worship. Visitor access to certain areas may be restricted, and the community's instructions take priority over the route.

Next step

Where to next

Go through the Kauman neighborhood to Ngasem, then head down toward the fenced pools.

Stop 6 of 9Next: Taman Sari

Route completed

Walk completed

“Sultan’s Yogyakarta and the Colonial City” — 9 stops, 4.2 km, 4.5–5.5 hours.

No App Store or Google Play

Guide On Map installs like an app

An icon appears on your home screen, the site opens without browser chrome, and downloaded routes stay handy.

Android · Chrome
  1. If “Install now” is below, tap it and confirm the install.
  2. If there is no button: menu ⋮ → “Install app”.
iPhone · Safari
  1. Tap the Share button at the bottom of Safari.
  2. Choose “Add to Home Screen”, then “Add”.
Home-screen iconFullscreen modeOffline routesWalk progress