Sharif spent half an hour at the sprawling sandstone mosque in the heart of Old Delhi, admiring it and its environs. (JPN)
Syed Ahmed Bukhari, the Shahi Imam of Jama Masjid, quoted Sharif as saying that his desire was to build better ties between India and Pakistan.
"He told me that he has come to India with a message of peace and to build closer ties," said Bukhari.
Accompanied by Sartaj Aziz, adviser on national security and foreign affairs, and Foreign Secretary Aizaz Chaudhry, Sharif had a leisurely view of Old Delhi from the elevated Mughal-built mosque.
"The Prime Minister said he felt as if he was in Pakistan," Bukhari said.
"He also said that there appeared to be no difference between this Jama Masjid and the Jama Masjid (he goes to) in Pakistan,” he added.
The Imam said he urged Sharif to relax the visa norms between India and Pakistan.
"Easier visas will enable Indians and Pakistanis to make visits without hassles," he said.
"I told the Prime Minister that once people come together, the governments will come together too,” he added.
Sharif came to India on Monday to attend Narendra Modi's swearing-in-ceremony.
Modi is scheduled to meet Sharif at 11.45 am today and the meeting between the two leaders is expected to last about 25 minutes.
The bilateral relationship between the two Asian neighbours has been bedeviled by what India views as Pakistan's hesitation in taking action against the perpetrators of the 26/11 Mumbai terror attacks.
As a goodwill gesture, Sharif on Sunday ordered the release of 151 Indian prisoners captured by Pakistan.
Sharif spent half an hour at the sprawling sandstone mosque in the heart of Old Delhi, admiring it and its environs.