The literal meaning of ‘kamikaze’ is ‘divine wind’. The relation with the Sung China that had been established in the Heian period was still prospering during the beginning of the Kamakura period. But this relationship started to deplete when China was conquered by the Mongols.
The Mongols first conquered China and then Korea and after conquering the two it laid eyes on the Japanese empire to conquer it and make it a part of the vast Mongolian empire. The most epoch-making event during the Kamakura period was the supposed try of the Mongolian conqueror Kublai Khan to capture Japan and make it a part of the expanding Mongolian empire.
The first attempt to invasion by the Mongols took place in 1274 in northern Kyushu but even before their attempt to attack they were allegedly hit by a typhoon that destroyed a large portion of their army and forced them to return back to China, according to the tales of the warriors. There were about 500 to 900 fleet of ships that were carrying around 40,000 Mongolian soldiers to attack Japan but while they were at the sea a typhoon hit the fleet leading to drowning of several of the Mongolian soldiers and many of the ships sank. But, a lot of scholars at this day believe that they were not struck by any typhoon at least not on their first attempt at invasion of Japan.
After this first attempt of invasion by the mongols, the Japanese built about 2mt high walls along the beaches to protect themselves from future invasions. After seven years of waiting the Mongols returned once again to try their hand in invading Japan but to no avail were able to do that. This time as the Japanese had built walls on their shores the Mongols were unable to find an area to land. After spending months on the sea they were destroyed by a great typhoon. The second fleet was larger, consisting of two forces with 4400 ships.
On the second attempt by Mongols at invasion of Japan, the Mongols again attacked northern Kyushu in 1281 with an army of 140,000 warriors, outnumbering Japanese soldiers, but, they were again forced to turn back to China after a battle of seven weeks with the Japanese soldiers and then struck by an actual typhoon. The typhoon led to death of half their soldiers and a few ships. After the storm the surviving Mongolian soldiers were killed by the Japanese soldiers. After this mongols never tried to invade Japan ever again. This typhoon is believed to be an interference of the deities to protect Japan from foreign invasion and was then referred to as ‘kamikaze’ or the ‘divine winds’. It is believed that it was god ‘Raijin’ was the one who turned these storms against the Mongols.
Source: Mikiso Hane