The two countries plan to give special permits to pilgrims to access the shrine of Guru Nanak through a corridor built on both sides of the border every day beginning next month.
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 the Gurdwara Darbar Sahib 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.
Officials of the two countries signed and shook hands at the land border point in India's northern Punjab province, in which nearly 80 percent of India's nearly 25 million Sikhs live.
Instead of visas, the two countries plan to give special permits to pilgrims to access the shrine through a corridor built on both sides of the border.
The shrine for the founder of Sikhism, Guru Nanak, was built after he died in the 16th century.