The narrative has it that a Chinese junk guided by three Portuguese Francisco Zeimoto, António Peixoto and António Mota was on its way to a port of Liampo in China when their boat was caught in a ferocious storm and lost its way in the open sea.
When the storm was over, one wonderful morning the trio found themselves disembarking on a beach of a remote island surrounded by people looking quite like Chinese that were watching the sailors with a vivid mix of curiosity and caution. The locals were particularly amazed by long beards and big round eyes of the visitors they've never seen before.
Portuguese merchants wasted no time and started showing the goods they brought with them to trade. At some point one of the Portuguese saw a bird overhead, grabbed his rifle and shot it. The locals heard horrible thunder accompanied by flame and saw the bird falling from the sky to their feet. A minute shock was replaced by even more curiosity as Portuguese appeared to be relaxed and enjoying. Some of the locals ran to pick up the bird, others came closer to see the weapon.
That was the first encounter of the Japanese with a European matchlock some time between 1542 and 1543.
With time the merchants picked up some of the local language and figured that they were on the island of Tanegashima, part of the Empire of Japan. The weapon itself later became known as 'tanegashima' or 'tanegashima matchlock' named after the lord of the island Tanegashima Tokitaka, who purchased the first two matchlock muskets and immediately ordered his swordsmiths to copy the matchlock barrel and firing mechanism. The production of rifles began in Kunitomo in 1544.
By the time the merchants left the island the Japanese managed to produce several dozens of working copies showing some extraordinary ingenuity. With introduction of rifle the way the wars were fought in Japan changed forever.
Another Portuguese adventurer-turned-author Fernão Mendes Pinto later on described himself as being in that first landing party, although some accounts have a mention of him as being in Burma at that time, but matters not - it all brought about the first direct contact between Europe and Japan.
The commercial exchanges and missionary work that followed left behind a unique list of loan words in both directions, with some of the most famous being:
tempura 天麩羅 / 天婦羅 from Portuguese tempero (seasoning, marinade)
tabako タバコ / 煙草 / たばこ from tabaco (tobacco, cigarette)
sabato サバト from sábado (Saturday)
shabon シャボン from sabão (soap)
pan パン from pão (bread)
kapitan 甲比丹 / 甲必丹 from capitão (captain)
oranda オランダ / 和蘭(陀) / 阿蘭陀 from Holanda (The Netherlands)
zesu or zezusu ゼス, ゼズス from Jesu (Jesus)
And no, ARIGATO did not originate from Portuguese OBRIGADO (although both words appear so similar and both mean the same thing). The Japanese form arigato gozaimasu (polite way of saying 'thank you!') has an ancient cousin arigatai that was found in written records compiled well before Portuguese set foot on Tanegashima beach.
Every year the inhabitants of Tanegashima island hold "Rifle Festival" to commemorate that first landing and the first rifle.
(Sources: Wikipedia, @novaportugalidade group, blog of Tanegashima Prefecture Public Relations Department )