Pope Francis wrapped up a four-day trip to Japan on Tuesday by turning from the anti-nuclear message that was the backbone of his visit to other key campaigns of his, urging students to defend the earth and show greater compassion.
Nuclear disarmament has been a key theme of the pope's trip to Japan, a country not only haunted by the memory of the two attacks that ended World War Two but also alarmed by the nuclear programme and missile tests of nearby North Korea.
But on Tuesday he turned to another message, telling students gathered at Sophia University, one of a handful of Catholic universities in Japan, that technology is worthless unless it is used to bring about a more humane and simpler society.
"For all the efficiency and order that mark Japanese society, I have sensed a yearning, too, for something greater: a profound desire to create an ever more humane, compassionate and merciful society," he said in his last event before departing for Rome.
Noting that Asian cultures are known for their love of nature, he urged them to fight for the future of the earth, echoing the major encyclical he issued in 2015 making environmental protection a moral imperative.
Francis, in the first visit to Japan by a pope for 38 years, also sought to address a growing sense of isolation in Japan despite its wealth.
Bullying remains pervasive in Japanese schools, as a group of young people described to Francis on Monday, and there is a growing number of people known as "hikikomori," who refuse to leave the safety of their houses, sometimes for years.
"More and more we see that a person, a community or even a whole society can be highly developed on the outside, but have an interior life that is impoverished and under-developed, lacking real life and vitality," he said in remarks on Monday at St Mary's Cathedral in Tokyo.
Japan's suicide rate, while improved, still remains high, and there has recently been an alarming jump in teen suicides.
Combating this "spiritual poverty" was something everyone was called to, Francis said.
"It means recognising that the most important thing is not what I have or can acquire, but with whom I can share it."
He also urged Japan to accept more than the handful of refugees it does every year despite its falling, ageing population.
"I ask you to extend the hand of friendship to those who come here, often after great sufferings, seeking refuge in your country," he said.
During his four days in Japan, Francis met with survivors of the atomic bombings of Nagasaki and Hiroshima as well as those of the March 11, 2011 Fukushima nuclear disaster, embracing a teenager forced to flee his home due to radiation.
He also said two Masses and met with Prime Minister Shinzo Abe and Emperor Naruhito, to whom he described the deep impression made on him as a nine-year-old boy in Argentina by his parents' tears at the news of the Nagasaki and Hiroshima bombings.