On an outcrop of rock southwest of the Red Fort , Shahjahan 's other great construction , the Jama Masjid ( the great congregational Friday Mosque ) , is the largest mosque in India .
Shahjahan built the mosque to preserve his historical legacy .