In 1947, newly ordained priest Fr. Karol Wojtyla (John Paul II) visited Padre Pio to meet the famous Capuchin friar. It was a brief visit, but Wojtyla didn't forget it, as he later wrote a letter to Padre Pio asking for prayers.
The letter was written (in Latin) in 1962, when Wojtyla was a bishop in Poland. The following is an excerpt of the letter from the book The Making of the Pope of the Millennium.
John Paul II never received a reply letter from Padre Pio, but a few short days afterwards, there was a miracle. John Paul II wrote a letter back to Padre Pio, expressing his joy.
It is no surprise that St. John Paul II became a strong advocate of St. Pio when he became pope, canonizing the Capuchin friar in 2002.