Old Delhi (, , "Purānī Dillī"), walled city of Delhi, was founded as Shahjahanabad (, , ) by Indian Emperor Shahjahan in 1639. It remained the capital of the Mughals until the end of the Mughal dynasty.