India and Pakistan have carried out a rare exchange of prisoners of war.
Arif (left) and Singh cross into India
Two Indian soldiers and a Pakistani returned to their respective countries at a handover at the Wagah border post.
Correspondents say that such transfers are unusual - particularly because both sides had earlier denied holding prisoners of war.
The handover - which took place amid scenes of jubilation on the Indian side of the border - comes as both countries are holding peace talks.
"I am very happy that I am alive and have come back to my country," said returning Indian soldier Mohammed Arif.
He and fellow prisoner Jagsir Singh had been held in Pakistan after being captured during border fighting in the Kargil area of Kashmir in 1999.
Initially they were accused of being deserters because their whereabouts were unknown.
While the returning Indian pair were greeted by joyful relatives carrying garlands, media access was more difficult on the Pakistani side for journalists covering the return of Saleem Ali Shah, a soldier who was captured by India during the Kargil conflict.
Three Pakistani civilians who apparently crossed over to India by mistake were also returned, an immigration official said.
For the returning Indian soldiers, life has changed a lot.
Corporal Singh's family - in his ancestral village of Kot Bhai in India's northern Punjab state - suffered ridicule and harassment following the desertion allegations.
Local police not only registered a case against the missing soldier but also repeatedly subjected his parents, wife and brother to bouts of interrogation.
The men disappeared during the 1999 Kargil conflict
His father, Gurdev Singh, died humiliated with his son listed as a deserter.
The corporal's young wife, Jaswinder Kaur, left their infant child, Saroj, who was born after he went missing, and went home to her parents.
Saroj was brought up by Corporal Singh's widowed mother, Chhoto Kaur, and he met his daughter for the first time shortly after his release.
Alongside stood his wife, Jaswinder, who had returned after receiving a letter from him last week.
"I am feeling very happy after meeting my daughter for the first time," Corporal Singh said, adding that he had been well treated and well fed.
Mohammed Arif was pleased to be on his way home.
"At one point I felt there was no chance of coming back," he told reporters shortly after arriving at Wagah, the sole overland border crossing between the two countries.
But his joy at returning was tempered by sad news.
He discovered that the woman he married 10 days before going to Kargil had remarried thinking he was dead.
He also learned that his mother had died during his time in prison.
On the Pakistani side Saleem Ali Shah also expressed relief at winning his freedom.
"They treated me well in prison. But I would appeal to both governments to release prisoners from each other's countries," he said.
Correspondents say that officially neither side is holding each others' prisoners, but there are families on both sides of the border who insist that their loved ones are still being detained.
One woman - whose father went missing during the 1971 war between the two countries - was on the Indian side questioning the returning soldiers to find out if they had any knowledge of his whereabouts.
It is not clear whether the Indian pair will be reinstated to the army.
"We will have to find out under what circumstances they crossed over the Line of Control and ended up in jail, an Indian defence spokesman told the AFP news agency.