Adım Adım Amasya

The Princes' Route · Stop 7

Ayas Ağa Madrasa

A small complex made up of a mosque, a madrasa and a primary school. The building's name appears in six different forms in the sources.

1494–1495 (AH 900) Small complex Şamlar quarter
The Ayas Ağa Madrasa
The Ayas Ağa Madrasa. TTK Archive (Kültürel Miras Boyutuyla Amasya, Photo 18).

Ayas Ağa's own endowment deed records that he was a freed slave of Bayezid II.1

It is a record of how far a person could rise in the Ottoman order of state: freed from slavery, he served for a time in Amasya as Prince Ahmed's head curtain-keeper (perdecibaşı),1 became Lesser Agha of the Gate at the palace, and had a complex built in his own name. The endowment deed is a document of both the building and its founder.

📜 What do the documents say?

The building stands in the Şamlar quarter, which is why it is also known as the Şamlar Mosque.2 It was built by İyas (Ayas) Ağa, Lesser Agha of the Gate (Küçük Kapı Ağası) to Bayezid II.3 It has no inscription; according to Hüseyin Hüsâmeddin it was built in AH 900 (1494–1495).2 Its endowment deed bears a date in the same year: 28 Jumada al-Akhira 900 / 26 March 1495.1

One source gives a different Hijri year. Fuat Er gives the year of construction as 1495 but writes the Hijri year as 901.3 Since AH 901 began in September 1495, the year that fits the date of the endowment deed is AH 900; the Gregorian year 1495 is common to both reckonings.

The building is a small complex made up of a single-domed mosque, a madrasa and a primary school (sıbyan mektebi). Because students were to be taught in the madrasa, rooms were built adjoining the mosque.1

There was a mosque here before. When the mosque built by Emir (Melik) Gazi in the Danishmendid period fell into ruin, Ayas Ağa, the Agha of the Gate, had it rebuilt as a complex in 1494–1495.4

Its madrasa is recorded separately. The madrasa, on the north bank of the Yeşilırmak and to the north of the Şamlar Mosque, is built of rubble stone; the records state that the mosque was used as a classroom.5

According to the sources, the same building is known by six different names.

Ayas Ağa Medresesi Ayas Ağa Külliyesi Medrese-i Ayâsiye6 Şamlar Camii2 Küçük Ağa Külliyesi4 Şamlar Medresesi5

The Great Agha, the Lesser Agha

This route has the works of two gate aghas of the same palace. Their titles, and the names of their buildings, mirror each other.

Agha of the Gate

Hüseyin Ağa

The Büyük Ağa Madrasa (1485–1489) and the Amasya Bedesten (1483) are his work.

Lesser Agha of the Gate

İyas (Ayas) Ağa

This complex (1494–1495) is his work. A freed slave of Bayezid II.1

While you are there, look for

Key facts

Built
AH 900 (1494–1495); endowment deed dated 26 March 14951, 2
Commissioned by
İyas (Ayas) Ağa, Lesser Agha of the Gate3
Endowment deed
Records that he was a freed slave of Bayezid II1
Parts of the complex
Single-domed mosque · madrasa · primary school1
Earlier building
The mosque of the Danishmendid Emir (Melik) Gazi4
Location
40.658756, 35.833216 — verified against OpenStreetMap
In the book
Kültürel Miras Boyutuyla Amasya, p. 45

📍 Open on the map

Sources

Every factual statement on this page rests on one of the sources below. Titles are given in their original Turkish so that they can be found; quotations from them are our translations.

  1. Muhammet Okudan, “Ayas Ağa Vakfı ve Amasya Küçük Ağa Külliyesi”, Kastamonu Üniversitesi İlahiyat Fakültesi Dergisi 9/2 (Eylül 2025), 60. — That the endowment deed names him as a freed slave of Bayezid II; his post as Prince Ahmed's perdecibaşı; the date of the deed, 28 Jumada al-Akhira 900 / 26 March 1495; the single-domed mosque and the students' rooms adjoining it.
  2. M. Baha Tanman, “Ayas Ağa Külliyesi”, TDV İslâm Ansiklopedisi, C. 4 (İstanbul: Türkiye Diyanet Vakfı, 1991), 201-202. — That it is also known by the name Şamlar; that it has no inscription and, according to Hüseyin Hüsâmeddin, was built in 900 (1494-95).
  3. Fuat Er, XV. ve XVI. Yüzyılda Amasya (Elazığ: Sosyal Bilimler Enstitüsü, Yüksek Lisans Tezi, 2009), 60. — The book (p. 45), citing this source, says “in 1495 (AH 901)”.
  4. Handan Aytekin, “Küçük Ağa Külliyesi”, Türkiye Turizm Ansiklopedisi (2020), turkiyeturizmansiklopedisi.com (Erişim 24 Eylül 2026). — An online encyclopedia entry, so it has no page number.
  5. Kader Dikbaş, Tokat ve Amasyalı Son Devir Osmanlı Uleması (Erzincan: Erzincan Binali Yıldırım Üniversitesi Sosyal Bilimler Enstitüsü, Yüksek Lisans Tezi, 2018), 15. — The section “Amasya'da Medreseler”: “The Şamlar madrasa: on the north bank of the Yeşilırmak… It was built by the Agha of the Gate, Ayas Ağa. It is of rubble stone.”
  6. Abdizade Hüseyin Hüsameddin Yasar, Amasya Tarihi, 4 Cilt (Ankara: Amasya Belediyesi Kültür Yayınları, 1986), 175.