The Sayid Niyaz Shalikarbay complex was built in 1842 , a rich merchant from Khiva. The granddaughter of Sayid Niyaz Shalikarbay Pashsha ana (grandmother) who narrates about her grandfather from the words of her father Hudaibergen ata (grandfather) recalls the following: “Our grandfather Sayid Niyaz Shalikarbay was called the whitewasher of shawls (dapmachi)”.
His father was a rich merchant, after his death all the wealth was inherited by Sayid Niyaz.
He continued to expand his production. One day, Sayid Niyaz and his friend, the merchant from Bukhara, Eshmatbay, loaded various goods onto camels and set out for Iran with a caravan.
They were lucky enough to sell all the goods they carried in a short time and stayed in Iran for several months after making friends with traders there. They spent all the money (except the initial capital) they had gained from trading with their friends, they ate and drank, partied and consumed it almost completely.
But due to the fact that Sayid Niyaz bai was an open-hearted and generous person, he could not leave the company of his friends. When it was time to return to his homeland, his friend Eshmatbay said: – “What shall we do now, what shall we do now?” – Sayid Niyaz replied, “We will now go to the market and use the money (sarmoya) left with us as much as possible, buy goods, load them on camels and go home.”
When the friends went to the bazaar, they did not have enough money to buy good goods. For this reason, after strolling through the market, they found themselves near a young fellow sitting in a corner, huddled like an old man, with an overgrown beard and moustache, in ragged clothes, selling white gum or Bukhari gum.
They said that they could not buy anything but white gum with the money they had left, besides, the days of the Muslim festival (i’d-hayit) were coming up and the trade would probably be good, so they bought all the white gum (ak sakich) from the man.
Overjoyed, they gave the young man the rest of the money, loaded the load onto camels and Eshmatbay went to Bukhara and Sayid Niyaz to Khiva. When Sayid Niyaz arrived in Khiva, he crushed a piece of chewing gum and could not believe his eyes – gold coins (tillya), pearls and precious stones fell out of the pieces of gum.
Sayid Niyaz Shalikarbay took the precaution of hiding half of the wealth in a place he knew and told his wife that these treasures would be enough for their seven generations if he did not return. He tied the rest of the treasure in his belt and went to the Khan.
After receiving permission to receive, he came to the Khan and said, “If there is a supreme command, then grant me permission to build a mosque with the money I have acquired in an honest way. Then Sayid Niyaz Shalikarbay laid the wealth he had brought before the Khan and told him the story that had happened.
The Khan was absorbed in long pondering and then said: – “To build the mosque, I give you permission, but you must also send the master his share. “So, to the east of the gate of Palvan-Darwaza Ichan-kala (in the territory of Dishan-kala), the construction of a mosque was started.
There is a rumour that only one master worked in the construction of the mosque and the rest of the work was done by children. Each of the children who brought a brick received a walnut.
In order to collect walnuts, the children ran to collect bricks and therefore the construction of the mosque proceeded at a fast pace. After the construction was completed, the believers started praying in the mosque.
On the days of the Muslim holiday khayit, Khan and his entourage would go to khayit namaz (prayers in honour of the holiday) at the Namazgah mosque, located outside the gates of Gandimyan-darwaza in Dishan-Kala. Seeing Sayid Niyaz Shalikarbay standing in the welcoming arch in front of the mosque, the Khan greeted him with the words “madrasa muborak” (“may the madrasa be blessed”) and passed by with his entourage.
Sayid Niyaz was surprised and said to himself, “Why did the Khan say that! Then, thinking that the word spoken by the Khan should not go unheeded, he started building a madrasa on the east side of a mosque.
The construction of the mosque occurred during the reign of Khan Allakuli of Khiva. The mosque construction required the following: The mosque should be roofed and have space for many people, and the inner part of the courtyard should have cool places for the Muslims to rest (during the hot months). Exactly these conditions are now present in the mosque of Sayid Niyaz Shalikarbay complex in Khiva.
The Sayid Niyaz Shalikarbay complex in Khiva consists of a mosque (winter and summer), a two-storey madrasah, a minaret and two courtyards. The winter mosque is a monumental structure with nine domes resting on four massive pillars. The mosque has three doors on three sides, the main entrance from the door in the aiwan wall on the north side.
The aiwan of the summer mosque has three wooden columns showing the best traditions of wood carving in Khiva. On the columns of the aiwan in the patterned coils is written in Arabic script the date in the Hijrah year 1212 (1797). On the walls of the aiwan of the summer mosque are patterned panels with gunch carvings.
There are patterned panels on the walls of the Aiwan of the Summer Mosque. The madrasah is attached to the north-eastern side of the mosque. It has two floors, five hujras on the ground floor and six on the ground floor. Currently, the mosque functions as the Jame Mosque of Khiva and the district.