NEW DELHI, India (CNN) -- India and Pakistan agreed Sunday to extend a nuclear testing ban and to set up a hotline between their foreign secretaries aimed at preventing misunderstandings that might lead to a nuclear war.

Delegations from both countries concluded talks with a joint statement that outlined several "confidence building measures" that include direct communications over the hotline and the testing ban.

"Each side reaffirmed its unilateral moratorium on conducting further nuclear test explosions unless, in exercise of national sovereignty, it decides that extraordinary events have jeopardized its supreme interests," the joint statement said.

Both India and Pakistan conducted nuclear tests in May, 1998 but then issued unilateral moratoriums on any more.

The talks were part of a process of improving relations between the often bitter neighbors.

The process started after then-Indian Prime Minister Atal Behari Vajpayee and the Pakistani leadership met in early January.

This is the first time technical level talks have been held between their delegations on nuclear issues since the 1998 tests.

The statement said the two sides had agreed on several points including upgrading communication hotlines between military commands, and called for regular meetings.