Pope Francis exchanged farewells with President Park Geun-hye at Myeongdong Cathedral in Seoul on Monday morning and invited her to the Vatican.
As his last official event, the pope presided over a mass at the cathedral. Afterwards he approached Park, who was sitting with bishops in the front pew, and thanked her for her hospitality during his stay here.
Park in turn thanked Francis for delivering a message of peace and reconciliation for the Korean Peninsula.
The pontiff presented her with a commemorative medal and a rosary.
Park was accompanied by Foreign Minister Yun Byung-se, Unification Minister Ryoo Kihl-jae, Minister of Gender Equality and Family Kim Hee-jung, and Cheong Wa Dae staff including chief of staff Kim Ki-choon.
But the most prominent participants in the mass were elderly Korean women who had been forced into sexual slavery by the imperial Japanese Army during World War II.
Kim Kun-ja (89), Kang Il-chul (87), and Lee Yong-soo (87), and four others were seated in the front pew. During the entrance procession, the pontiff stopped and greeted each of them with a deep bow.
After the mass, the pope headed for Seoul Airport in Seongnam, Gyeonggi Province. Prime Minister Jung Hong-won went there to see him off. The pontiff shook hands with Catholic leaders before boarding the plane.