Image copyright Nationaal Museum van Wereldculturen Image caption A man stepping on the fumie, watched carefully by officials

Pope Francis arrived in Japan on Saturday ahead of a trip to Nagasaki to pay tribute to the victims of the atomic bomb dropped on the city during World War Two. But he will also pay tribute to a lesser known group of residents who, hundreds of years ago, were tortured and forced into hiding for their beliefs.

A man waits nervously in line to be called. When he hears his name he steps forward, watched closely by local and government officials from the capital, who have been sent down specially for the occasion.

In front of the man is a small bronzed image fixed with the image of Jesus Christ on the cross. The man is told to step on it.

If he does, it's a public declaration that he has given up his faith - and he will live to see another day. If he doesn't, he could face execution, crucifixion or torture - forced into boiling hot springs or suspended upside down in a pit of excrement.

Any sign of hesitation could cost him his life.

This practice of stepping on Christian images - known as fumie - was widespread in the city of Nagasaki in the 17th century.

The 'Rome of Japan'

Nagasaki, an important port city, was first introduced to Christianity around 1560 when Jesuit missionaries from Portugal began arriving in Japan. The Portuguese empire was at the time one of the large maritime empires in the world, with bases everywhere from Africa to Asia.

The Jesuit missionaries worked to convert the feudal lords of the area, some of whom recognised that converting to this foreign religion could help them gain trade support from the Portuguese. Many peasants under these feudal lords would also be made or influenced to convert to the religion and by the early 17th century, the town had become the "Rome of Japan".

"Nagasaki was basically established as a Christian city [with] parishes," Professor Kiri Paramore, professor of Asian studies at the National University of Ireland, told the BBC. "Nowhere else [in Japan] was as Christian as Nagasaki was."

At its peak, there were up to 500,000 people in Nagasaki that identified as Christian.

Image copyright Getty Images Image caption The Portuguese arrived in Nagasaki during the 17th century

But over time, Japan's political authorities decided the rapid growth of the religion posed a threat to the central government. They decided to crack down.

"They were looking to get rid of Christianity, but they were also looking to remove the foreigners as a political threat to security of the state... so the two things were related," said Mr Paramore.

In the latter half of the 16th Century, 26 missionaries in Nagasaki were executed by crucifixion - this signalled the start of what would end up being a long period of persecution against Christians.

In 1614, a strict nationwide ban on Christianity was issued. Foreign missionaries were quickly expelled from the country, those who refused to leave were arrested, killed, or forced to renounce the religion. Japan as a whole entered a period of isolation, cutting off almost all contact with other nations under the government of the time, the Tokugawa Shogunate.

Tortured over and over again

Around the 1620s, authorities decided it wasn't enough to get rid of the religious leaders. They had to come up with a public way to root out the religion from the hearts of the people.

The solution? The fumie. These were brass images, sometimes set in wooden boards, depicting either the Christ or Mary. Every single person that lived in Nagasaki was ordered to go through the practice of stepping on the fumie. Soon it became an annual practice carried out at the start of each year.

"It was an obligation, the commoners, the samurai, the Buddhist monks, even sick people couldn't miss it - they would bring the wooden board to their house. Every single person had to do this," said Martin Ramos, professor of Japanese studies at the Ecole Francaise D'extreme-Orient.

"It was quite well thought out because at the time, Christians relied a lot on images. People prayed in front of an image - Mary, Jesus - so many thought that part of the God was inside the image. It was a link to the divine... for them to tread upon this, was something very fearful."

Image copyright Getty Images Image caption A fumie with the face of Christ completely worn away

But many eventually gave in and trampled on the fumie.

"If you examine an original fumie closely, one poignant detail is that the face of Christ has been completely worn away, [reminding] us of the countless feet that would have trampled on it," said Professor Simon Hull, an expert in Japanese Catholicism at Nagasaki Junshin Catholic University.

The Christians who refused to tread on the fumie were killed, or, more commonly, tortured.

"They would sometimes torture them by hanging them over a pit filled with excrement. They would cut slits around their temples to release [the pressure] so they wouldn't die," said Mr Paramore.

Image copyright Getty Images Image caption Christians were hung upside down in pits filled with excrement

The main aim of this torture was not so much to kill those who refused, but to "break their resolve".

"Sometimes there was even a doctor present so that when a Christian being tortured looked likely to die, they would be nursed back to health before being tortured again," said Mr Hull.

An estimated 2,000 people did eventually die as martyrs, refusing to renounce their faith.

Image copyright Getty Images Image caption Jesuit missionaries beheaded in 1622 Nagasaki

Others pretended to renounce the faith but still continued being Christian in secret.

"[They would] return home, begging God to forgive them," said Mr Hull. "In one community, they would even burn the sandals they had worn, mixing the ashes with water before drinking it as an expression of their profound penitence."

They eventually became known as Kakure Kirishitan, or hidden Christians.

"These people would still secretly practice things like baptism, they would give their children secret Portuguese Christian names like Paulo, Mario and Isabella. They would celebrate nativity, Easter," said Mr Ramos.

Image copyright Getty Images Image caption A statue of the Buddhist goddess Kanon, used as a symbol for Mary

They would also incorporate Japanese elements into their practice to evade being identified as Christians.

"For example if you think of communion, the bread and wine, they might use rice instead of bread," said Mark Mullins, professor of Japanese studies at the University of Auckland.

Japanese gods like the deity Kannon were also used to secretly represent the Virgin Mary.

"For more than 200 years they had no contact with [foreign] missionaries. So it became a very local religion, something passed on to the next generation," said Mr Ramos.

Out of the woodwork

By the the end of the 19th Century, Japan decided to open its borders again. In 1858, the fumie practice was abolished in Nagasaki. In 1873, Japan's long ban on Christianity was finally lifted - more than two centuries after it was first put in place.

"When Japan opened up its borders again, around 20,000 Christians reappeared and came out of hiding," said Mr Mullins. "In that sense, the [fumie] policies were effective. You'd gone from around 500,000 to 20,000 Christians."

The Pope, during his visit to Nagasaki, will make a stop at a memorial dedicated to the 26 martyrs who died at the beginning of the persecution. Today, only around 1% of Japan's population of 126m are Christians. The Christian community in Nagasaki remains one of the largest in the country.

Image copyright Getty Images Image caption The pope is expected to visit a memorial dedicated to the 26 martyrs

"One of the paradoxes of Japanese Christian history is that if all Japanese Catholics had refused to trample on the fumie and instead chosen to die as martyrs, Christianity in Japan would also have died," said Mr Hull.

"It is only because some made an existential decision to trample on the fumie, despite their belief that this action was gravely sinful, that Christianity in Japan was able to survive."

Additional reporting by the BBC's Hideharu Tamura.

All pictures copyright.