India and Pakistan signed an agreement on Thursday allowing Indian pilgrims to cross the border to a Sikh shrine in Pakistan, rare cooperation between the nuclear-armed rivals at a time of tension and clashes elsewhere on their frontier.
The pact will introduce visa-free access from India to the Pakistani town of Kartarpur, home to a temple that marks the site where the founder of Sikhism, Guru Nanak, died.
"Today is a day of celebration," Pakistani foreign ministry spokesman Mohammad Faisal told a signing ceremony in Kartarpur.
Prime Minister Imran Khan will formally open the border to pilgrims on November 9, said Faisal, who signed the agreement on behalf of Pakistan with an Indian official.
"It was very, very difficult and tough negotiations with India, because of the history we have, it is never easy, it is never simple," Faisal said.
The Sikh minority in India has long sought easier access to the temple, which is just over the border in Muslim-majority Pakistan.
The pact comes at a time of considerable tension between the rivals, with Pakistan particularly aggrieved over recent Indian government measures in its part of the divided Muslim-majority region of Kashmir.
Clashes have erupted regularly over their disputed border in Kashmir with several people killed on both sides in shelling over the weekend.
The inauguration of the crossing point comes just before the 550th birthday of Sikhism's founder on November 12.
The shrine is about 4 km (2-1/2 miles) from the border. The crossing and corridor - including a road, bridge over the Ravi River and immigration office - will replace a drawn-out visa process and circuitous journey through Pakistan.
But there has been Indian opposition to a sum of $20 that Pakistan will charge each visitor.
Faisal said the $20 was a service charge, not a fee, and pilgrims would just have to present their passports, which would be quickly scanned, to cross in.