The Dream That Built a Mosque: The Story of Takkeci İbrahim Ağa
A journey, a vision, and a hidden treasure—how a simple prayer cap maker’s dream led to the construction of a mosque in Istanbul, in a story some say inspired The Alchemist.
Have you ever heard of a story so powerful that it inspires a best-selling novel?
Legend has it that Paulo Coelho’s The Alchemist—a novel about destiny, faith, and following one’s dreams—was inspired by an old tale from Istanbul: the story of Takkeci İbrahim Ağa.
A poor prayer cap maker, a dream of a distant land, a hidden treasure, and the creation of a mosque—this is not just a folk tale but a testament to how belief can shape reality. This is where our journey begins, exploring the unseen gems of Islamic architecture.
Welcome to the first chapter in our new series, Ink, Tile, and Stone: The Hidden Art of Islamic Architecture, In this first installment, we’re exploring the dream that led to the building of the Takkeci Ibrahim Agha Mosque1.
If the Sea Catches Fire
A long time ago, there was a small, old neighborhood outside Topkapi District in Istanbul. In one of its rundown houses lived a man named Takkeci İbrahim Ağa (pronounced as /takkedji/). He was a poor man who earned his living by selling prayer caps (takke) in a tiny shop in the bazaar. A deeply religious person, he never desired to be wealthy in this world; instead, he wished to be rich in the afterlife.
Despite his poverty, İbrahim Ağa had a dream—to build a mosque in his neighborhood before he died.
"It seems impossible, but who knows?" he would say, "Perhaps the sea will catch fire one day..."
His wife and neighbors sincerely supported his wish, but they also found his hope amusing.
"Oh, İbrahim Ağa," they would laugh, "Do you really think that could ever happen?"
One night, İbrahim Ağa fell asleep with these thoughts in mind and found himself in a dream, immersed in a world of beauty and mystery.
In his dream, fairy-like women danced around him, singing and offering him the most delicious fruits. As he watched in amazement, a group of angels appeared, carrying an old man with a white beard under their wings. The wise man approached and greeted him:
"Peace be upon you, İbrahim Ağa!"
İbrahim Ağa was startled.
"The sea may catch fire," said the old man. "Do not lose hope, Ağa! Travel to Baghdad and see what Allah has in store for you."
Still in shock, İbrahim Ağa asked, "Baghdad? But why? What will I do there?"
The wise man smiled.
"There, you will find two grapes meant for you. You must pick them and eat them. Here is the vine..."

Before İbrahim Ağa could respond, the old man disappeared, carried away by the angels. Startled, İbrahim Ağa woke up. His heart was racing. He sat in bed for a while, as if searching for something he had lost in his dream. Then he woke up his wife.
Excitedly, he told her the entire dream in great detail.
"Wife, I am leaving," he finally said. "Please prepare some provisions for my journey."
His wife, still half-asleep, asked, "Leaving? Where are you going?"
"To Baghdad! Did you not hear my dream?"
She was a faithful woman and did not object. That very night, they began preparing for the journey. By dawn, everything was ready. İbrahim Ağa performed his morning prayers, bid his wife farewell, and set off on a journey that, at the time, would take many long weeks to complete.
The Journey to Baghdad
For weeks, İbrahim Ağa traveled across vast lands, riding camels and mules under the scorching sun. Finally, he arrived in Baghdad. Now, he had to find the vine from his dream.
At a roadside inn, he sat on a stone bench, reflecting on his journey. Suddenly, he noticed that the scenery looked exactly like the dream he had seen. His heart pounded.
"The vine must be here!" he thought.
With excitement, he stood up and looked around. Then, his eyes locked onto a vine standing nearby.
"There it is!" he gasped. "Before the sun sets, I must eat those grapes."
Just as in his dream, the vine had no bunches of grapes hanging from it. But hidden between its dry leaves were two small, glistening grape berries, like two enchanted eyes staring back at him.
With great care, he picked them.
"Bismillah!" (In the name of God!)
He placed both grapes in his mouth. A sense of deep peace washed over him, as if he had just drunk the freshest, coolest water on a hot summer day. He leaned back against the bench, feeling a soothing happiness fill his heart.
"My journey was not in vain," he thought.
He was still lost in his dream-like state when a stranger sat down beside him.
"Peace be upon you," the man greeted.
İbrahim Ağa did not even notice at first. Only when the man spoke again did he snap out of his thoughts.
"Where have you traveled from?" the stranger asked.
"Are you asking me?" İbrahim Ağa responded.
The man nodded. "Yes, you seem to be a traveler. Where are you from?"
"From Istanbul."
"Are you here for trade?"
"No, I came because of a dream."
Curious, the man asked him to explain. İbrahim Ağa told him the entire story—his dream, his journey, and the two grapes.
The stranger listened carefully and then burst out laughing.
"You are a very simple man, my friend," he said. "Who would travel from Istanbul to Baghdad just for two grapes?"
Then, after a pause, the man continued:
"Last year, I had a dream too. In it, I was told, ‘Go to Istanbul. Find the house of a man named Takkeci İbrahim Ağa in a neighborhood outside Topkapı. In his coal storage, there is a small pot of buried gold. Dig it up and take it.’ But of course, I never went!"
İbrahim Ağa’s eyes widened in shock. His heart pounded. This man was talking about his own house!
At first, he wanted to reveal the truth, but then he held back. Instead, he calmly replied:
"Well, my friend, sometimes people are shown treasures they cannot claim, while others find treasures they never seek."
Then, without wasting another moment, he immediately set off back to Istanbul.

The Treasure in the Coal Storage
This time, İbrahim Ağa traveled faster and lighter. He barely stopped to rest, feeling younger, happier, and full of hope. He repeated to himself:
"I will build a mosque! The sea has caught fire!"
When he finally arrived home, his wife and neighbors welcomed him eagerly.
"Did you eat the grapes?" they asked.
He simply replied:
"The sea is catching fire..."
Some laughed, thinking he had lost his mind. Others pitied him, believing that the long journey had exhausted him beyond reason.
Later that evening, after the crowd had left, he turned to his wife and whispered:
"Now, my dear, it is our turn to laugh."
He told her everything—the conversation with the man in Baghdad, the treasure he had unknowingly left behind, and how it was waiting in their own home.
Excited, they went to the coal storage and began digging.
Sure enough, they found the pot of gold.
Using this unexpected fortune, İbrahim Ağa built the mosque he had always dreamed of.
He named it Takkeci Mosque. Over time, the entire neighborhood took on this name, honoring his unwavering faith and perseverance.
And thus, the story of Takkeci İbrahim Ağa’s dream became a legend, proving that sometimes, one must embark on a long journey just to find the treasure that was always at home.
*This story is a translation of 'Takkeci İbrahim Ağa'nın Rüyası' by Vural Samancıgil, originally published in 1982. This translation remains faithful to the original while making the story accessible to a wider audience.2
Stay tuned for the next chapter in Ink, Tile, and Stone: The Hidden Art of Islamic Architecture, where we explore the artistic and historical significance of Takkeci İbrahim Ağa Mosque.
Takkeci İbrahim Ağa Mosque is also known by several variant names, including Takkeci İbrahim Çavuş Camii, Takkeci Mosque, Takkeci İbrahim Çavuş Mosque, Takyeci İbrahim Ağa Mosque, Arakiyeci İbrahim Ağa Mosque, Aga Camii, and Takyeci Mescidi.
Samancıgil, Vural. 'Takkeci İbrahim Ağa'nın Rüyası.' Hayat Tarih ve Edebiyat Mecmuası, Issue 1, No. 205, 1982