Along the Yeşilırmak, in the fabric of Amasya's markets and neighbourhoods, there stand beside the buildings that bear the names of princes and sultans the works of a few palace aghas whose names are little known. These officials rose in the court of Bayezid II and, thanks to their closeness to the sovereign, turned the wealth they accumulated into charitable foundations. With a bedesten, two madrasas and a bathhouse in Amasya, they gave the city's daily and scholarly life a lasting framework. The best documented of these is the waqf established by the chief white eunuch Hüseyin Agha. Because the octagonal plan of his madrasa is treated in a separate article, the discussion here concentrates on Hüseyin Agha himself, the structure of his waqf, and the whole of palace patronage in Amasya.
Amasya was a city where Bayezid II served for many years as sanjak governor and which, in the following century, kept its ties with the dynasty as a princely sanjak. That aghas trained in the inner service of the palace founded waqfs here belongs to the same age as the sovereign's attachment to the city. The aghas' foundations added a second layer to Amasya's architecture and institutions, alongside the princely complexes and the sultanic endowments.
The Office of Kapı Agha and Hüseyin Agha
The kapı agha is the agha of the Bâbüssaâde, the Gate of Felicity in Topkapı Palace that separated the Outer Court from the Enderun. He controlled entry to the Inner Court, transmitted the sultan's orders to the palace officials, and the management of the palace school also fell within his sphere. Because he was chosen from among the white eunuchs, he was regarded as the head of the White Aghas. The office carried great prestige in the fifteenth and sixteenth centuries; its holders received the rank of vizier and ranked in protocol immediately after the grand vizier and the şeyhülislâm. In the age of Süleyman the Magnificent the kapı aghas also took on the administration of the waqfs of the Two Holy Cities and of more than seventy large mosques. The office began to lose weight in 1587, when the Darüssaade agha became independent of it. The reign of Bayezid II, in which Hüseyin Agha lived, was a period in which the office still enjoyed high standing.
What is known about Hüseyin Agha's life is limited. On the inscription of his madrasa in Amasya his name appears as Hüseyin Agha b. Abdülmuîn. Recent research on the waqf describes him as one of the aghas of the New Palace (Saray-ı Cedîd). On the inscription of his bathhouse in Istanbul his name is written with the title "Bey". Ayvansarâyî, the author of the Hâdikatü'l-Cevâmi, reports that he was put to death by execution and buried in his tomb at Küçük Ayasofya. The sources do not explain the reason for his death. That a plaque placed at the tomb by the public calls him "Kesikbaş Hüseyin Agha" ("Hüseyin Agha the Beheaded") shows how his end was remembered. According to a report that goes back to the same source, the following couplet is written on the wall of the tomb: "Life in this world lasts but a single hour / Spend that hour in devotion at once." His fortune outlived him thanks to his foundations. Semavi Eyice's long article "Kapu Ağası Hüseyin Ağa'nın Vakıfları," published in 1978, is the basic study that brings these charitable works together.
The Amasya Bedesten
Hüseyin Agha's first major investment in Amasya was the bedesten at the centre of the market. According to its inscription, the building was constructed in 888 (1483) to provide income for his foundations. A bedesten was a sturdy, domed commercial building in the Ottoman town, with iron-clad doors, where valuable goods were stored and sold. The Amasya Bedesten, located in the Kocacık Market, is likewise a building with entrances on four sides and shops closed to the outside. Its entrance is of cut stone with a depressed pointed arch, the body walls are built of rubble stone and brick, and the foundation inscription is above the west door.
The sources do not agree on the original form of the building. The article on the bedesten describes the Amasya example as a nine-bay structure with four piers, each bay covered by a dome. Cultural and tourism records, on the other hand, describe a six-domed plan with four doors, with arches carried by two large piers in the centre, and stress that the building was larger than its comparable examples. In both accounts the building has a plan that counts as generous among medium-sized bedestens. The part that stands today has four domes, because a section of the original building was lost in later centuries.
That the bedesten was an income-producing building was a conscious choice. The basic principle of the Ottoman waqf system was to cover the expenses of a charitable institution with a continuous income. For this purpose Hüseyin Agha placed a masonry building on the commercial artery of the city, intending to keep the charitable institutions he had founded alive with its revenue. The bedestens and shops attached to the waqf formed the source of the commercial income concentrated in central Amasya among the waqf's properties.
The Kapı Ağası Madrasa
Hüseyin Agha's principal monument is the madrasa that rises on the bank of the Yeşilırmak in the Şamlar quarter. The building, also known as the Büyük Ağa Madrasa and the Medrese-i Hüseyniyye, is dated by the TDV İslâm Ansiklopedisi, on the basis of its inscription, to 894 (1489). Other records give 1488. Because the Hijri year 894 straddles two Gregorian years, the source of this difference is often simply the conversion of calendars. The inscription was removed from above the north-western entrance of the madrasa and today is in the Amasya Museum, broken into pieces.
The octagonal plan of the building is a feature with hardly any parallel in Ottoman madrasa architecture. The TDV entry notes that this originality arose from the topography of the site as much as from a search for form. It is also reported that the same plan scheme was applied, with some modifications, by Mimar Sinan in the Rüstem Pasha Madrasa in Istanbul, dated 1550. The details of the architecture are the subject of a separate article; what matters here is how the madrasa was kept going as an educational institution.
In the years when it was first built the madrasa held the rank of thirty (otuzlu), and in 1556 it was counted among the forty-level madrasas. Some accounts place it in the group of sixty-level madrasas. The best known of its professors was Taşköprülüzade Mustafa Müslihiddin Efendi. It is thought that the classical-style fountain in front of the building may also be one of Hüseyin Agha's charitable works. The empty marble panel above the arch of the fountain was probably prepared for an inscription to be set in.
The madrasa lost its vitality in the late nineteenth century. Abandoned after 1940, the building was badly damaged in the 1942 earthquake; after 1965 the dome of the lecture hall collapsed and the portico in front of it almost disappeared. Some records date the repair to 1978, while the TDV entry ties it to the restoration carried out by the Directorate of Foundations in the 1980s. In this work the ruined dome of the lecture hall, the portico arches, the columns and their capitals were rebuilt, and a fountain for ablutions was placed in the middle of the courtyard. Today the madrasa is used as a Qur'an course that provides hafız training. That it still serves an educational purpose after more than five hundred years shows how soundly its founder's charity was established.
The Waqf Deed and the Properties of the Waqf
The most valuable document of the Hüseyin Agha Waqf is the thirty-eight-folio Arabic waqf deed preserved in the Topkapı Palace Museum Archive. A recently published study examined this deed together with the income and expenditure registers in the Ottoman Archive and laid out the structure of the waqf. According to it, the legal status of the waqf properties, the procedures for appointing trustees, and attempts over time to convert the waqf into private property were assessed in the light of the juristic opinions of the period. The provisions of the deed are regarded as early examples of the financial and administrative discipline that secured the continuity of the waqf.
The properties of the waqf were centred on Amasya but spread over a wide geography. Besides bedestens and shops, villages, hamlets, lands, cash capital and crop revenues were attached to the waqf. Outside Amasya these properties reached Samsun, Tokat, Çorum, Merzifon, Kavak and Sonisa. That crop and rental incomes varied from year to year shows that the waqf had a fluctuating and lively economic structure.
On the expenditure side, the staff of the madrasa stands out. The professor, students, imam, muezzin and servants were paid daily wages. The accounting records dated 963 (1556) and 1012 (1603) show that a significant part of the waqf's expenditure was allocated to the Büyük Ağa Madrasa. These records document that the madrasa continued to exist as a sustainable educational institution thanks to the income of the waqf.
Charitable Works in Istanbul, Edirne and Sonisa
Hüseyin Agha's charitable activity was not confined to Amasya. According to the entry on the Çardaklı Hamam, besides the madrasa and bedesten in Amasya he had a mosque and madrasa built in Sonisa (Sunasa, today called Uluköy) in the north-east of Amasya, in Istanbul the Küçük Ayasofya Mosque, converted from a church, together with a tomb and a zaviye, a masjid in Çarşıkapı, and in Edirne a number of hans. Eyice too mentions in his article the charitable work at Sonisa, one of the villages of Amasya. This list shows that Hüseyin Agha was an extremely wealthy agha.
His best-known work in Istanbul is the conversion into a mosque of the Church of Saints Sergius and Bacchus, built by Justinian I around 530. Because of its similarity in plan to Hagia Sophia, the building was called Küçük Ayasofya (Little Hagia Sophia) in the Turkish period. The portico of the last congregation on the west façade, which Hüseyin Agha had built during the conversion, is in the classical Ottoman style. A zaviye and the founder's tomb were also added to the mosque. In the octagonal tomb, besides Hüseyin Agha, lies the sarcophagus of Sheikh Hacı Kâmil Efendi of the Şabâniyye branch of the Halvetiyye. The zaviye later became a madrasa; Ayvansarâyî reports it as having thirty-six cells, of which thirty-two have been identified.
The Çardaklı Hamam, which provided income for the complex, stands in the Kadırga quarter near the mosque. According to the Arabic inscription above its door it was built in 909 (1503-1504); Aydın Yüksel reads the date on the inscription as 907 (1501-1502). According to the entry in the Istanbul Waqf Survey Register, its waqf deed is dated 913, Cemâziyelâhir (October 1507), and its annual income of 42,500 akçe was assigned to the neighbouring mosque. The bathhouse is the Istanbul counterpart of the role the bedesten played in Amasya: the income-producing commercial building keeps the charitable institution alive.
Ayas Agha and the Şamlar Complex
Palace patronage in Amasya is not limited to Hüseyin Agha. Ayas Agha, another kapı agha of the same period, had a complex built in the Şamlar quarter in 1495. The group, consisting of a mosque, madrasa, children's school and cemetery, is known by the name of its founder as the Ayas Agha complex, by the name of its quarter as Şamlar, and among the people as the Küçük Ağa ("Little Agha") Complex. When one considers that Hüseyin Agha's madrasa is called Büyük Ağa ("Great Agha"), it can be seen that in Amasya two aghas' waqfs live on under names that answer each other.
The site of the complex is connected with an earlier mosque. It is reported that after the mosque built in the Danishmendid period by Emir (Melik) Gazi was demolished, Ayas Agha rebuilt the site as a complex. Since the complex has no inscription, the date also appears in sources as 1494-95. The mosque has a square plan and a single dome, with rubble-stone walls. The hexagonal base of the minaret survives from the time of the earlier mosque. The madrasa is U-shaped, and its porticoes, carried by twelve cylindrical columns, are covered by thirteen domes. Each of the rooms has a hearth and a cupboard, but the madrasa has no separate lecture hall. The wider space at the eastern end is the children's school, used today as a library. None of the eight graves in the cemetery has an inscription, and most have been damaged over time. The complex was repaired in 2007.
The Kumacık Hamam
Ayas Agha's waqf also follows the same logic as Hüseyin Agha's. According to the waqf register of the Ayas Agha complex, the Kumacık Hamam in the Bayezid Pasha quarter was built in 1495 on a plot purchased separately in order to bring income to the complex. This information was established in a study published in Vakıflar Dergisi. After it was built, the bathhouse underwent changes at different times, so its present plan and appearance differ from the original. Today it consists of a dressing room with a nearly square plan and a dome, a warm room with a flat ceiling arranged as a narrow corridor, and a hot room with four iwans and three-cornered private cells. The Kumacık Hamam belongs to Ayas Agha's waqf and is not counted among Hüseyin Agha's charitable works. Even so, that the two aghas founded waqfs in the same years, in the same city, by the same method shows how well established this system was.
The Logic of the Waqf System
The waqfs founded by the kapı aghas rest on the same economic reasoning. An income-producing commercial building (a bedesten, bathhouse or han) was built, and the rent of that building was assigned to the expenses of a charitable institution. Charities such as the mosque, madrasa, children's school, zaviye and fountain were kept going by this income. In this way the fortune that left the benefactor's purse turned into a source that renewed itself every year. The Amasya Bedesten, the Çardaklı Hamam and the Kumacık Hamam are concrete examples of this system.
Waqf income was set aside not only for the upkeep of buildings but also for the people inside them. The pay of the professor, students, imam, muezzin and servants was fixed in the waqf deed. The trustee, that is, the administrator of the waqf, was appointed according to the conditions of the deed. In the case of the Hüseyin Agha Waqf, it is known that there were attempts over time to convert the waqf into private property, and that these were discussed in the light of the juristic opinions of the period. It appears that the detailed provisions of the deed took a legal discipline into account.
The Later Fate of the Bedesten
The building Hüseyin Agha left to the market suffered much damage over the centuries. Severely damaged in the earthquake of 1079 (1668), the bedesten was left unrepaired for a long time. Its inclusion in the building works begun in 1864-1865 by the poet Ziya Bey (Ziya Pasha), then the mutasarrıf of Amasya, did not save it. The lead was stripped from the domes and the domes were pulled down. It is reported that complaints were made and an investigation opened on this account. The roof built in place of the domes also collapsed before long, and for many years the bedesten stood open to the sky, only four walls.
In the 1950s three bays of the bedesten were demolished and a business hall was built in their place. In 1957 there was a move to follow the same course for the remaining part, but this attempt was prevented. In a restoration begun around 1970 and completed in 1971, the Directorate of Foundations had the domes of the remaining section rebuilt. From the original building, the body walls and the inscription dated 1483 have reached the present day.
In the autumn of 2025 a meeting was held on a comprehensive restoration of the bedesten, attended by the Governor's Office of Amasya, the Tokat Regional Directorate of Foundations, market tradesmen and property owners. It was announced that the title-deed procedures for the bedesten had been completed and that project preparations would begin shortly. After the restoration, the building is planned to be opened to tourism and to remain a place that carries on traditional market life.
Chronology
1483: Hüseyin Agha has the Amasya Bedesten built to provide income for his foundations (888 according to the inscription).
1488 / 1489: The Kapı Ağası (Büyük Ağa) Madrasa is completed; the date based on the inscription is 894 (1489), and 1488 in some records.
1495: Ayas Agha has his complex built in Şamlar; the Kumacık Hamam is built to provide income for the complex's waqf.
1503-1504: Hüseyin Agha's Çardaklı Hamam is built in Istanbul (1501-1502 according to Aydın Yüksel).
1507: The waqf deed of the Çardaklı Hamam is drawn up (913, Cemâziyelâhir).
1550: Mimar Sinan applies the octagonal plan scheme of the Amasya madrasa in the Rüstem Pasha Madrasa in Istanbul.
1556: The madrasa holds the forty-level rank; an accounting record shows that a significant part of the waqf's expenditure was allocated to the madrasa.
1603: Another accounting record of the waqf is kept (1012).
1668: The Amasya Bedesten is badly damaged in an earthquake.
1864-1865: During the building works of the Amasya mutasarrıf Ziya Bey, the domes of the bedesten are pulled down.
1942: The dome of the madrasa's lecture hall is badly damaged in the Amasya earthquake.
1950s: Three bays of the bedesten are demolished and a business hall is built in their place.
1971: The Directorate General of Foundations has the domes of the bedesten rebuilt.
1980s: The madrasa is repaired by the Directorate of Foundations.
2025: A meeting on the restoration of the bedesten is held in Amasya.
Bibliography
Academic studies
- Gülay Burgaz, "Kapı Ağası Medresesi", TDV İslâm Ansiklopedisi, https://islamansiklopedisi.org.tr/kapi-agasi-medresesi
- "Bedesten", TDV İslâm Ansiklopedisi, https://islamansiklopedisi.org.tr/bedesten
- "Çardaklı Hamam", TDV İslâm Ansiklopedisi, https://islamansiklopedisi.org.tr/cardakli-hamam
- "Küçük Ayasofya Külliyesi", TDV İslâm Ansiklopedisi, https://islamansiklopedisi.org.tr/kucuk-ayasofya-kulliyesi
- Semavi Eyice, "Kapu Ağası Hüseyin Ağa'nın Vakıfları", Edebiyat ve Beşeri Bilimler Dergisi, sy. 9 (1978), s. 151-246, https://dergipark.org.tr/tr/pub/literatureandhumanities/issue/83326/1446268
- Muhammet Enes Yüksek, "Osmanlı Döneminde Büyük Ağa Medresesi: Vakıf Yapısı, Mülkleri, Hizmet Kadroları ve Gelir-Giderleri", Amasya İlahiyat Dergisi, Hafızlık Özel Sayısı (2026), s. 339-376, https://dergipark.org.tr/en/pub/amailad/article/1853703
- Sibel Yarar, "Amasya Kumacık Hamamının İlk İnşasındaki Planına Dair Bir Değerlendirme", Vakıflar Dergisi 54 (2020), s. 185-200, https://dergipark.org.tr/tr/pub/vakiflar/issue/57986/687583
Official sources
- Kültür Portalı, "Amasya Bedesteni", https://www.kulturportali.gov.tr/turkiye/amasya/gezilecekyer/amasya-bedesten
- Kültür Portalı, "Kapı Ağası Medresesi", https://www.kulturportali.gov.tr/turkiye/amasya/gezilecekyer/kapi-agasi-buyuk-aga-medreses
- Kültür Portalı, "Küçük Ağa Külliyesi / Şamlar-Ayas Ağa Külliyesi", https://www.kulturportali.gov.tr/turkiye/amasya/gezilecekyer/kucuk-aga-samlar--ayas-aga-kullyes
Other sources
- İstanbul Ansiklopedisi (Reşad Ekrem Koçu), "Hüseyin Ağa (Kapuağası)", https://istanbulansiklopedisi.org/handle/rek/30684
- Handan Aytekin, "Küçük Ağa Külliyesi", Online Türkiye Turizm Ansiklopedisi, https://turkiyeturizmansiklopedisi.com/kucuk-aga-kulliyesi
Online sources
- https://islamansiklopedisi.org.tr/kapi-agasi-medresesi
- https://islamansiklopedisi.org.tr/bedesten
- https://islamansiklopedisi.org.tr/cardakli-hamam
- https://islamansiklopedisi.org.tr/kucuk-ayasofya-kulliyesi
- https://dergipark.org.tr/en/pub/amailad/article/1853703
- https://www.kulturportali.gov.tr/turkiye/amasya/gezilecekyer/amasya-bedesten









