Mathura Shahi Idgah Mosque is original Sri Krishna Janmasthan Keshavdeva Temple

Mathura Shahi Idgah Mosque was built by Aurangzeb in 1670 CE after destroying Keshavdeva Temple at original Sri Krishna Janmasthan.
Mathura Krishna Janmasthan Temple Complex

Lord Krishna was born in Mathura jail at midnight of 17-18 June 3229 BCE (gregorian calendar) on Sravana Krishna Ashtami (vedic panchangam).
Lord Vishnu appeared in the form of ‘Prisnigarbha‘ to Devaki and Vasudeva in the jail before taking birth as Krishna.
This is the same form in which he appeared to Dhruva and blessed him with the benediction of Dhruva Loka. Vishnu, in this form was earlier born to prajapati Sutapa and his wife pRsni during Tretayuga of Swayambhu Manvantara.
Later, the same form was worshipped by Vasudeva and next by Krishna in Dwaraka. This idol is currently at Guruvayur temple.
Lord Prsnigarbha is mentioned briefly in Srimad Bhagavatam in verses 2.7.8 and 10.3.32-41.
Prisni means “Pristine” or “pure”, something which is clean and un-adulterated.
Garbha is the womb, which also means “seed” or the “source of origin”.
Prisnigarbha Vishnu Avatar

Originally Mathura was known as Madhuvana (dense forest).
According to the Harivamsa (95.5242-8), a Yadava king Madhu, the descendant of Yadu ruled from Madhuvana. Rama’s brother Satrughna killed the Madhava Lavana, a descendant of Madhu, cut down the Madhuvana forest and built Madhupuri (Mathura city) there. After the death of Rama and his brothers, Bhima, son of Satvata, a descendant of Madhu recovered the city.
Uttara Ramayana mentions in detail, the battle between Satrughna and Lavana (called Lavanasura because of his evil deeds).
Lavana’s father was gifted an extension of Trident (Trisool) by Lord Siva, which was transferred to him and it made him unbeatable.
Madhu got Siva Trisool
He continued to torment the innocent and destroy many sacrifices of sages and terrify them. Many kings were defeated by him. One day, sages headed by Chyavana (a descendant of sage Bhrigu) came all the way from Madhuvan to Lord Rama with a plea to protect them.
Madhu was kind and compassionate to Brahmanas, very exalted, made personal friendships with Devas and therefore Asuras and Suras were at peace.
His so named Lavana had the qualities opposite to those of his father.
Lavana was so evil that even as a child he would beat play mates, kill them, and eat them. Madhu handed everything over to his son including his trident and drowned himself in the ocean due to shame.
Rama’s ancestor Mandhata had dominated the entire earth and he became so proud that he wanted to rule heaven also. So he challenged Indra-either to turn over the kingdom to him or fight with him in battle. Indra said, “If you defeat all personalities on earth, then I will give you my kingdom.
Lavanasura destroyed Mandhata’s army with the trident.

After listening to Lavana’s story through sages, Rama decided to kill him. After discussion among brothers, Satrughna got the oppurtunity to kill Lavana as he never got a chance to serve Rama in the past.
Satrughna was crowned as king of Mathupuri and sent with army.
It was decided that army will leave in summer and cross river Ganga, while Satrughna will leave during rainy season alone. This is to make sure that Lavana does not get a hint about upcoming war.
On the way, he stopped at Sage Valmiki’s ashram, where Seetha delivered twins (Kusa and Lava) on same night.
Satrughna gifted them new clothes and moved on towards Mathura.
Uttara Ramayana Seetha Satrughna Kusa Lava

When Lavana returned home after hunting animals for eating each day, Satrughna challenged him to fight. Lavana was very happy to accept the challenge because it was his dessert time but his Trident was at home. Lavana uprooted many trees and threw them on Satrughna, and a big battle ensued. Later, Satrughna used the special arrow that Rama had given him. He struck Lavana right in the heart taking out his life-breath. Rama then appointed Satrughna as the king of Madhupur, where he ruled for 12 years and while returning to Ayodhya, stopped at Valmiki ashram and listened to Lava and Kusa singing Ramayana.
After Rama and his brothers left their bodies, Bhima, son of Satvata, a descendant of Madhu recovered Mathura.
Aitareya Brahmana mentions Satvatas as Yadu dynasty kshatriyas. Andhaka, who was son of Bhima Satvata was contemporary with Kusa, son of Rama.
He succeeded his father to the throne of Mathura.
Andhakas, the Vrishnis, the Kukuras, the Bhojas and the Shainyas are believed to have descended from Satvata, a descendant of Kroshtu. These clans were also known as the Satvata clans.
According to the Puranas, the Andhakas were the descendants of Bhajamana, son of Andhaka and grandson of Satvata.

Vayu Purana mentions that the Yadava ruler Ugrasena belonged to this clan (Kukurodbhava). According to the Puranas, Ahuka, a Kukura, had two sons by a Kaasi princess, Ugrasena and Devaka. Ugrasena had nine sons and five daughters, Kamsa being the eldest. Devaka had four sons and seven daughters, Devaki was one of them. Kamsa usurped the throne of Mathura after imprisoning Ugrasena. But later he was killed by Krishna, son of Devaki, who re-installed Ugrasena to the throne.
This Krishna was born in a jail, where Devaki and her husband Vasudeva were kept by Kamsa.
The original jail was later converted to a temple dedicated to Krishna and it was built the birthplace by Krishna’s great grandson Vajranabha.
This Vajranabha was the great grandson of Krishna, the grandson of Pradyumna and Son of Aniruddha.
Vajranabha also constructed the original Dwarakadheesh temple at Dwaraka and installed Lord Krishna idol over there.
The original temple was at Krishna Janmasthan (birthplace of Krishna) and diety was Keshavdeva.

Greek traveller Megasthenes, who visited India during era of Alexander – Chandra Gupta I, identified Krishna as greek god Herakles (possibly because Krishna was also called Hari and Herakles sounded like Hari-Krishna).
Greeks gave their own convinient names to India gods and kings.
Their identified kings Sandracottus and Sandrocyptus, with Chandra Gupta I and Samudra Gupta of the Gupta dynasty of the kings of Magadha, that succeeded the Andhra dynasty, and were contemporaries of Alexander in 326 BCE.
Megasthenes about Mathura and Krishna
Megasthenes in Indica reports of a Herakles similar diety in India, who far surpassed other men in personal strength and prowess, and cleared sea and land of evil beasts. Marrying many wives he begot many sons, but one daughter only. The sons having reached man’s estate, he divided all India into equal portions for his children, whom he made kings in different parts of his dominion. He provided similarly for his daughter, whom he reared up and made a queen.
Bactria kings (Indo-Greeks), minted coins of Krishna holding Sudarshana Chakra and Balarama with plough.
Agathocles Coins Balarama Krishna

According to Arrian, Diodorus, and Strabo, Megasthenes described an Indian tribe called Sourasenoi (Soorasena, who was father of Vasudeva and founder of that family tree), who especially worshipped Herakles (krishna) in their land, and this land had two cities, Methora (Mathura) and Kleisobora (Krishnapura, which could now be a small town in Vrindavan), and a navigable river, the Jobares (Jamuna/Yamuna).
Apollo and Hercules are Krishna and Balarama
James Tod associated Herakles primarily with Baladeva, Krishna’s older sibling, but also indicated that Herakles could be associated with both:
How invaluable such remnants of ancient race of Harikula! How refreshing to the mind yet to discover, amidst the ruins on the Yamuna, Hercules (Baldeva, god of strength) retaining his club and lion’s hide, standing on his pedestal at Baldeo, and yet worshipped by Suraseni! This was name given to a large tract of country round Mathura, or rather round Surpura, the ancient capital founded by Surasena, the grandfather of the Indian brother-deities, Krishna and Baldeva, Apollo and Hercules. The title would apply to either; though Baldeva has the attributes of ‘god of strength’. Both are es (lords) of the race (kula) of Hari (Hari-kul-es), of which the Greeks might have made the compound Hercules.
— James Tod, Annals and Antiquities of Rajasthan
Greek mythology must have developed after Mahabharat and Krishna stories, as Yavan (greek) were in sea trade with India (Dwaraka).

On 14 December 3218 BCE (Siva Ratri), Krishna killed Kamsa and started his Mathura Leela at age of 11 years 6 months.
In June 3207 BCE, Krishna decided to leave Mathura and form Dwaraka, a new city in western seashore.
Kakuras, who occupied Dwaraka were mentioned in Nashik Cave Inscription of Gautami Balashri. It mentions that her son Gautamiputra Satakarni conquered the Kukuras. The Junagadh Rock Inscription of Rudradaman I includes the Kukuras in the list of the peoples conquered by him.

Archaeological excavations of the site had revealed pottery and terracotta from 6th century BCE. 8th century inscriptions mentions donations to the site by the Rashtrakutas. In 1017 CE, Mahmud of Ghazni attacked and plundered Madhuban.
Ghazni’s scribe, though not accompanying him on the expedition, Al Utbi describes in his Tarikh-i-Yamini neighbouring holy town which is identified as Mathura. He wrote, “In the centre of the city there was a huge and magnificent temple, which the people believed wasn’t built by men but by the angels… Any description of the temple, either in words or in pictures, would fall short and fail to convey its beauty.
Mahmud of Ghazni wrote, “If any one wished to construct a building equal to it, he would not be able to do so without spending a hundred million dinars, and the work would occupy two hundred years, even though the most able and experienced workmen were employed.
He ordered to burn all the temples and demolish them. He plundered gold and silver idols and carried away a load of hundred camels.
Mathura Sri Krishna Janmabhoomi in 1949

FS Growse, in his book, Mathura-Brindaban: The Mystical Land of Lord Krishna, says about Mahmud’s Mathura campaign, “Orders were given that all the temples should be burnt with naphthala and fire and levelled with the ground. The city was given up to plunder for twenty days. Among the spoil are said to have been five great idols of pure gold with eyes of rubies and adornments of other precious stones, together with a vast number of smaller silver images, which, when broken up, formed a load for more than a hundred camels.

A stone inscription in Sanskrit found from the site mentions that in Vikrama Samvat 1207 (1150 CE) a person named Jajja who may have been a vassal of Gahadavala king built a Vishnu temple which was ‘brilliantly white and touching the clouds.’
Abdullah, in the reign of Mughal emperor Jehangir, mentions in Tarikh-i-Daudi the destruction of Mathura and its temples by Delhi Sultan Sikandar Lodi in 16th century. Lodi had prohibited Hindus from bathing in the river and shaving of heads on the banks as well. During the reign of Jehangir, in 1618 CE, Raja Veer Singh Deva Bundela of Orchha had built a temple at the cost of thirty-three lakhs.
A French traveller Tavernier visited Mathura in 1650 CE and had described the octagonal temple built in red sandstone.
Italian traveller Niccolao Manucci who worked in Mughal court has also described the temple.
Mughal prince Dara Shikoh had patronised the temple and donated a railing to the temple. The railing was removed by Mathura governor Abdun Nabi Khan on the order of Mughal emperor Aurangzeb and he built Jama mosque on the ruins of the Hindu temples. During the Jat rebellion in Mathura, Abdul Nabi Khan was killed in 1669 CE.
Aurangzeb attacked Mathura and destroyed that Keshavdeva temple in 1670 and built Shahi Eidgah in its place.

Mathura Temple desctruction by Aurangzeb Mughal Painting
Mughal painting which depicts the destruction of Krishna Janmasthan (birthplace of Krishna) temple at Mathura.
After the destruction of the temple, the original Murti of Lord Krishna was taken and placed at the footsteps of royal Jahanara Begum Mosque in Agra for the devout Muslims to continually trod the Krishna idol with their feet (also depicted in the painting)

It was demolished in the month of Ramzan, 1080 A.H. (13th January – 11th February 1670 CE) by Aurangzeb’s order. “In a short time, by the great exertion of the officers, the destruction of this strong foundation of infidelity was accomplished and on its site a lofty mosque was built at the expenditure of a large sum.” To the author of Maasir-i-‘Alamigiri, the accomplishment of this ‘seemingly impossible work’ was an “instance of the strength of the Emperor’s faith.
Even more disgraceful was transporting the idols to Agra and burying them under the steps of the mosque of the Begum Sahib “in order to be continually trodden upon.” Aurangzeb even changed the name of the sacred city of Mathura to “Islamabad“.
Today, a mosque occupies the place of Krishna Janmabhoomi temple. But a new temple has been erected post independence in the immediate vicinity of the mosque.
Mathura Shahi Idgah Masjid
Source: Maasir I Alamgiri of Saqi Mustad Khan. Translated by Jadunath Sarkar(1947). Page 60.
Many Brahmin priests were killed in defence of temple. A priest who tried to smuggle Krishna’s Murti was hαnged.

Mathura came under British control in 1804 CE. The East India Company auctioned the land of Katra (marketplace around the Masjid) and it was purchased by Raja Patnimal, a wealthy banker of Banaras.
Raja Patnimal wanted to build the temple but could not do so. His descendants inherited the land of Katra. His descendant Raj Krishna Das was challenged, for the ownership of 13.37 acres of land on which the shrine and the Eidgah is situated, in two civil suits by the Muslims of Mathura but the Allahabad High Court ruled in favour of Raj Krishna Das in both suits in 1935 CE. Kailash Nath Katju and Madanmohan Chaturvedi had helped in lawsuits. Politician and educationist Madan Mohan Malaviya acquired the land from Raj Krishna Das on 7 February 1944 at the cost of Rs. 13000 with financial help of Industrialist Jugal Kishore Birla.
Following death of Malaviya, Jugal Kishore Birla formed a trust named Shri Krishna Janmabhoomi Trust, later registered as the Shri Krishna Janmasthan Seva Sansthan, on 21 February 1951 and acquired the land.
Mathura Sri Krishna Janmabhoomi
Jugal Kishore Birla entrusted the construction of the new temple with another industrialist and philanthropist Jaidayal Dalmia. The construction of the temple complex was started in October 1953 with leveling of lands and completed in February 1982.
In 1968, the Trust and the Shahi Eidgah committee reached an agreement which granted the temple land to the Trust and the management of the Eidgah to the Eidgah committee as well no legal claim of the Trust on the Eidgah.
Following the demolition of the Babri Mosque in 1992, Manohar Lal Sharma, a resident of Vrindavan, has filed a petition in the Mathura District Court challenging the 1968 agreement as well as a petition to quash the Places of Religious Worship Act of 1991 which preserves the status quo as on 15 August 1947 for all places of worship.

Reference : Krishna Janmasthan Temple Complex