Battle of Bun'ei

The Battle of Bun'ei (文永の役), also known as the First Battle of Hakata Bay was the first attempt by the Yuan Dynasty founded by the Mongols to invade Japan. After conquering the Japanese settlements on Tsushima and Iki islands, Kublai Khan's fleet moved on to Japan proper and landed at Hakata Bay, a short distance from Kyūshū's administrative capital of Dazaifu. Despite the superior weapons and tactics of the Mongols, who established the Yuan Dynasty in China in the early 1270s, the Yuan forces that disembarked at Hakata Bay were grossly outnumbered by the samurai force; the Japanese had been preparing, mobilizing warriors and reinforcing defenses since they heard of the defeats at Tsushima and Iki.

The Yuan troops withdrew and took refuge on their ships after only one day of fighting. A typhoon that night, said to be divinely conjured wind, threatened their ships, persuading them to return to Korea. Many of the returning ships sank that night due to the storm.

The battle
After landing in the bay, the Yuan force quickly overran the town of Hakata (now a ward of Fukuoka), but were engaged by a number of samurai soon afterwards.

At first, the samurai were hopelessly outmatched; accustomed to ritualized archery duels on horseback, they could not match the organization and massed firepower of the invaders. The Mongols fought with precision, loosing heavy volleys of arrows into the ranks of the Japanese. The Mongols also employed an early form of rocket artillery, and their infantry used phalanx-like tactics, holding off the samurai with their shields and spears. Though unable to conclusively defeat the Yuan forces, the Japanese fought hard and inflicted heavy casualties.

In the course of the day's fighting, the Hakozaki Shrine was burned to the ground.

Despite their initial victories, the Yuan did not pursue the samurai further inland to the defenses at Dazaifu. Nihon Ōdai Ichiran explains that the invaders were defeated because they lacked arrows.

More likely this was a result of their unfamiliarity with the terrain, the expectation of Japanese reinforcements, and the heavy losses already suffered. The Yuan force, which may have intended to carry out a reconnaissance in force rather than an immediate invasion, returned to their ships. That night, the Yuan lost roughly one-third of their force in a typhoon. They retreated back to Korea, presumably at the prodding of their Korean sailors and captains, rather than regrouping and continuing their attack.