Pope Francis has wanted to visit Japan since he was a young missionary and his trip was filled with emotion and memorials -- but also some lighthearted moments.

Here are some highlights of his four-day trip, which capped an Asia tour that also took in Thailand:

Pope Francis delighted the crowd by donning a traditional Japanese 'happi', worn for festivals
Pope Francis delighted the crowd by donning a traditional Japanese 'happi', worn for festivals POOL / Pierre-Emmanuel DELETREE

The majority of the pope's public appearances were sombre affairs, celebrating mass or marking disasters such as the Fukushima nuclear meltdown or the atomic attacks on Hiroshima and Nagasaki.

But the 82-year-old threw off the shackles of formality during a speech to young people, departing frequently from his prepared remarks and joking with the audience, asking them at one point if he was boring them and if he should go on.

Pope Francis kissed a stream of babies passed up to him
Pope Francis kissed a stream of babies passed up to him AFP / Vincenzo PINTO

He said some young people today are like "zombies", who are bored by everything and "no longer dream, laugh or play."

"We have invented all sorts of gadgets but we still can't take selfies of the soul. Thank God!" said the pope, who seemed invigorated by his exchanges with Japan's youth.

In more unscripted activities, he was presented with a colourful "happi" shirt, a traditional garment worn for Japanese festivals, and the beaming pontiff immediately put it on over his white vestments, giving a thumbs-up to the crowd.

The pope's meeting with a young survivor of the Fukushima nuclear disaster was one of the emotional highpoints of the trip
The pope's meeting with a young survivor of the Fukushima nuclear disaster was one of the emotional highpoints of the trip VATICAN MEDIA / Handout

Francis was exposed to some choice Japanese weather during his trip, with fierce winds and torrential rain greeting his arrival and blowing his robes around.

People waited in the rain for Pope Francis
People waited in the rain for Pope Francis AFP / Ed JONES

A storm -- complete with thunder and lightning -- broke hours before his solemn speech marking the atomic attack on Nagasaki, forcing the faithful to huddle under umbrellas and transparent waterproofs.

The pope was also shielded by a phalanx of brollies and delivered his speech under a protective tarpaulin but he broke from cover to pray at the memorial, his bowed head pelted with rain becoming one of the images of the trip.

Just hours later, the weather had completed changed and the crowd celebrating Mass with him in Nagasaki's baseball stadium had to shield themselves not from the rain but from a fierce sun.

Pope Francis had long wanted to visit Japan
Pope Francis had long wanted to visit Japan POOL / KIM HONG-JI

There were several moments of high emotion during the trip, with many survivors of the Hiroshima and Nagasaki attacks or Fukushima nuclear disaster breaking down as the pontiff comforted them.

But the pope seemed especially moved by the testimony of 17-year-old Matsuki Kamoshita who described how he wanted to kill himself after the Fukushima disaster, as he was bullied after being evacuated.

In a strong and steady voice but trembling with emotion, Kamoshita challenged adults to reveal the truth about the contamination and fallout of the disaster, saying: "I don't want them to die before us, having lied or not admitting the truth."

The pope rushed up to him after the speech and they had a long exchange, the boy bowing and struggling to keep his emotions in check, before throwing his arms around the pope in a touching, spontaneous moment.

Any worries that Francis might receive a muted welcome in a country where less than one percent of the population is Catholic was quickly dispelled, as enthusiastic crowds turned out wherever he went.

The centrepiece was a Mass at the vast Tokyo Dome, packed out with around 50,000 worshippers, the pope moving through the crowds in his popemobile, beaming, waving, and kissing a steady stream of babies presented to him by his guards.

At one point, Francis stepped down from the popemobile to greet the crowds and was mobbed by enthusiastic people jostling for a brief greeting. "Very busy schedule for a rock-star pope," headlined the Nikkan Sports tabloid.

Pope Francis and North Korea's Kim Jong-Un probably have very few things in common but tight security wherever they go is one.

Like Kim, Francis had bodyguards flanking his motorcade when he landed in Nagasaki, six sharply dressed personnel first walking and then breaking into a jog as the car sped up, their brollies bobbing up and down in rhythm.