India and Pakistan achieved little progress at their first security talks in over a year as negotiations were cut short on Wednesday by violent clashes at a mosque in Islamabad.
The fighting between troops and militant students holed up inside the Pakistan mosque was the latest problem to divert attention from a peace process between the rivals.
The peace talks launched in 2004 have made slow progress with some Indian officials saying that Pakistan President Pervez Musharraf's domestic political troubles this year had changed Islamabad's priorities.
A joint statement issued at the end of talks between the top interior ministry bureaucrats said the neighbours agreed to step up cooperation to curb militant violence.
They also agreed to release all fishermen taken into custody when they strayed into each others' waters and speed up the release of other civilian prisoners languishing in jails in the two countries.
"India raised its concerns relating to terrorism and fugitives," an Indian statement said. "It was agreed that effective and sustained measures would be taken to combat the menace of terrorism.
"It was agreed that terrorists and criminals in either country would be effectively dealt with."
The talks were due to end later on Wednesday but Pakistan Interior Secretary Syed Kamal Shah returned to Islamabad late on Tuesday after trouble erupted at the mosque in Islamabad.
The security talks are part of a larger peace process launched after the two countries came close to the brink of another war in 2002.
India says there has been a spurt in the infiltration of Islamist militants into Indian Kashmir from the Pakistani side in recent weeks, and no let up in plans by Pakistan-based militant groups to launch attacks elsewhere across India.