By Rina Chandran and Alastair Sharp SHARM EL-SHEIKH, Egypt (Reuters) - India and Pakistan agreed Thursday to work together to fight terrorism and ordered their top diplomats to meet as often as needed to try to rebuild ties damaged by last year's Mumbai attacks.
But Indian Prime Minister Manmohan Singh, speaking after talks with his Pakistani counterpart Yusuf Raza Gilani in Egypt, ruled out a resumption of formal peace talks, known as the "composite dialogue," that Islamabad has been seeking.
"Composite dialogue cannot begin unless and until terrorist heads which shook Mumbai are properly accounted for, (and) perpetrators of these heinous crimes are brought to book," Singh told a news conference after talks with Gilani.
India broke off the formal peace process after the attack on Mumbai by Pakistan-based militants who India says must have been helped by Pakistani security agents.
Islamabad denies state agencies had any role and says it will prosecute those accused of involvement in the attacks.
In a statement after meeting on the fringes of a Non-Aligned Movement summit, the prime ministers "affirmed their resolve to fight terrorism and to cooperate with each other to this end."
"Both prime ministers recognized that dialogue is the only way forward," the statement said, adding that the countries' senior diplomats would continue meeting.
Thursday's talks in the Egyptian resort of Sharm el-Sheikh was the third high-level encounter between the two neighbours since the Mumbai assault.
"It's a good step forward and it's a way out of the impasse that the two sides found themselves in after Mumbai," said C. Raja Mohan, professor of South Asia studies at Singapore's Nanyang Technology University.
Analysts said the statement had kept the nature of future dialogue open.
"They have affirmed their faith in dialogue without making any commitment on the precise nature of dialogue which means it's open-ended and India will make its decision about dialogue when it is satisfied with Pakistan's performance on terrorism," said Hasan Askari Rizvi, a Lahore-based independent analyst.
The joint statement said the foreign ministries' top civil servants, India's Shivshankar Menon and Pakistan's Salman Bashir, "should meet as often as necessary" and report to their countries' foreign ministers.
Singh said the meetings of the top civil servants would be used to determine the nature of the future dialogue.
On his talks with Gilani, Singh added: "I reiterated to him that we are willing to go more than half the way provided they create the conditions for a meaningful dialogue."
The Pakistani prime minister later said he was hopeful about further progress in relations with India. "I am very optimistic. Their attitude was very positive, very open."
In their statement, Gilani vowed Pakistan "will do everything in its power" to bring those behind Mumbai to justice and Singh said India was "ready to discuss all issues with Pakistan."
In Islamabad, the Supreme Court adjourned for two weeks an appeal hearing by the government challenging the release of Hafiz Saeed, the founder of the Lashkar-e-Taiba militant group that New Delhi has blamed for Mumbai attacks.
(Additional reporting by Cynthia Johnston in Sharm el-Sheikh, Bappa Majumdar and Matthias Williams in New Delhi, Kamran Haider in Islamabad; Writing by Edmund Blair; Editing by Myra MacDonald)