India's Atal Behari Vajpayee and Pakistan's Zafar Allah Khan Jamali met alone on the sidelines of a regional summit in a gesture of rapprochement.
Earlier, Vajpayee used the opening ceremony of a summit of the seven-nation South Asian Association for Regional Cooperation (SAARC) to call for a "bold transition" to peace after a half-century of conflict and mistrust.
"We have to change South Asia's image and its standing in the world," Vajpayee said.
"We must make the bold transition from mistrust to trust, from discord to concord and from tension to peace," he continued, to applause.
India's foreign minister said the prime ministers "agreed to maintain the momentum" during their meeting.
And in a further sign of progress, Yashwant Sinha told reporters Vajpayee had requested a meeting with Pakistani President Pervez Musharraf, the country's real power.
Vajpayee, paying his first visit to Pakistan in almost five years, shook hands and smiled with Jamali in front of television cameras and photographers before the meeting.
"Let me tell you Mr Vajpayee is holding my hand very, very firmly," Jamali said with a smile.
Jamali said he had great respect for the Indian leader.
"He is a visionary, a poet, a prolific writer and an able politician, which are the qualities of a true leader," he said.
Pakistan's prime minister said greater economic integration in South Asia would remain a "distant dream" unless the region's heavyweights could resolve their differences.
Two years ago, India and Pakistan went to the brink of war over the disputed Himalayan region of Kashmir.
"We must make the bold transition from mistrust to trust, from discord to concord and from tension to peace"
Atal Behari Vajpayee
Indian Prime Minister
Vajpayee and Jamil talked together with aides before meeting alone.
"It was a good meeting," Pakistan Foreign Minister Khurshid Mahmud Kasuri told reporters.
Sinha said Vajpayee's meeting with Musharraf was requested for Monday. The two are scheduled to meet at a state dinner on Sunday.
They last met at a failed summit in the Indian city of Agra in July 2001, and briefly shook hands at a South Asian summit in Nepal two years ago, but are not known to have had any contact since then.
Vajpayee spoke to Jamali by telephone last year, shortly after launching what he called a final attempt for peace in his lifetime.
Thousands, including civilians, have
been killed in the Kashmir conflict
The two sides have since resumed full diplomatic ties and resumed transport links. The peace process was bolstered in November when Pakistan announced a ceasefire along the front line in Kashmir, which has since held.
However, violence has continued in Indian-administered Kashmir between security forces and rebels and diplomats warn the peace process remains fragile.
During their three-day summit, South Asia leaders are expected to approve a regional free trade deal that is in itself seen as a sign of improving India-Pakistan ties.
Before arriving in Islamabad, Vajpayee said he was willing to talk "openly" about Kashmir, but stressed that resolution of the issue would take time.