It is believed that during the reign of Shah Jahan, India had the largest GDP or Gross Domestic Produce among all the countries of the world, including the English who had only recently started their journey to colonise the world. In fact the production in India at the time was a staggering 25% of the world produce (source). The per-capita income in India was same as some of the most advanced world economies of the time, including Britain and France.
It was during this era of prosperity in India that Shah Jahan also took up the construction of some of the most monumental buildings the world ever made, including the majestic Taj Mahal. Roughly during the same time Europe was also growing rapidly and some of the most well known buildings were built, including St Peter's square at Vatican and Palace of Versailles in France, both in the then dominant baroque style.
Back home in India with the seat of power in Delhi now, in 1644 Shah Jahan decided of build a huge place of worship for Muslims, right across the street from his official residence - the Red Fort. The choice of material was red sandstone, the use of which was already perfect by the Mughals and came to define their architecture style.
The main architect of the mosque was Ustad Khalil who created a template of such a perfect mosque that the same design was later used to build the Badshahi mosque in Lahore later by his son Aurangzeb. Finally after 12 years of hard work by over 5000 workers, the mosque was finally ready in 1656. It was not other mosque, so for it's inauguration, a special imam was invited all the way from Bukhara, in present day Uzbekistan. Even today the imam of the mosque is from the same family, and they are known as Bukharis.
The mosque is built at an elevation of 30 feet from the ground, on a red sandstone porch. There are two minarets on either side of the main mosque and both are 40 metres (130 feet) high. One of these is also accessible to the visitors to climb up.
The courtyard is large and was the biggest at that time. When full, it can accommodate a total of 25,000 worshippers. As is typical to most mosques, the prayer hall is simple and bereft of any excessive designs. The floor has design which replicates the prayer matt used by Muslims.
Soon after the mosque was finished, Shah Jahan took ill and in 1658 was replaced by his son, Aurangzeb, as the Emperor of India. After eight years of confinement at the Red Fort in Agra, he finally died in 1666, aged 74.
With Shan Jahan death, and the changed priorities of subsequent Mughal kings that ruled the country India's legacy of a leader of arts, crafts and architecture, slowly faded away. Looking back now, this mosque was the swansong of Shah Jahan's illustrious region at the helm of the Mughal empire and came to signify the beginning of an end of India's golden era.