On October 19, 1596, the Spanish ship San Felipe was shipwrecked on Urado in Kōchi on the Japanese island of Shikoku en route from Manila to Acapulco. The local daimyo Chōsokabe Motochika seized the cargo of the richly laden Manila galleon, and the incident escalated to Toyotomi Hideyoshi, ruling taikō of Japan. The pilot of the ship suggested to Japanese authorities that it was Spanish modus operandi to have missionaries infiltrate a country before an eventual military conquest, depicting the Spanish campaigns in the Americas and the Philippines in this way. This led to the crucifixion of 26 Christians in Nagasaki, the first lethal persecution of Christians by the state in Japan. The executed were later known as the Twenty-Six Martyrs of Japan.
Soon after the first contacts in 1543, Portuguese ships started to arrive in Japan to trade. At the time, the Japanese desired Chinese goods such as silk and porcelain, but had been prohibited from private trade with China by the Ming dynasty as a punishment for wokou pirate raids. The Portuguese were therefore able to act as intermediaries trading Chinese goods for Japanese silver, and profited immensely.
The Nanban trade, as this Euro-Japanese activity came to be called, was closely tied to the propagation of Christianity. Portuguese-sponsored Jesuits took the lead in proselytizing Japan, and the fait accompli was approved in Pope Gregory XIII's papal bull of 1575, which declared that Japan belonged to the Portuguese Diocese of Macau. The Jesuits' exclusive right to propagate Christianity in Japan meant that their sponsors, the Portuguese, had the exclusive right to trade with Japan within Christendom.
The Christian mission in Japan enjoyed early success among the warring daimyo of the Sengoku period, because Portuguese traders were more likely to visit ports belonging to a Christian lord, which for the daimyo meant easier access to European firearms. This situation gradually changed as Toyotomi Hideyoshi came close to unifying Japan and became concerned about potential decentralizing factors, such as vassals following a foreign religion. In 1587, after a cordial audience with Gaspar Coelho, Superior of the Jesuit mission, Hideyoshi became yet more concerned as Coelho boasted that the Jesuits could summon Portuguese warships and rally Christian daimyo for Hideyoshi's upcoming invasion of Korea. No more than two weeks later, on July 24, Hideyoshi ordered the expulsion of the Jesuit missionaries from Japan. It was not strictly enforced, though, and Hideyoshi himself allowed Jesuits into Japan as translators and trade agents. Eventually the missionaries felt safe enough to continue their proselytising in Japan, albeit discreetly.
Despite the union of the Spanish and Portuguese crowns in 1580 stipulating that Spain would not interfere with Portugal's colonial empire, Spanish-sponsored missionaries of the Franciscan Order viewed Portugal's success in Japan with jealousy and sought to disrupt the Jesuit monopoly in Japan. These friars entered Japan via the Philippines in 1593, and an initial audience with Hideyoshi was deemed encouraging enough that they began to preach openly near the capital Kyoto. The Jesuits immediately protested this disregard of the 1587 edict, but the Franciscans, convinced of the soundness of their methods after their successes in the Americas, paid the warnings no heed.
On July 12, 1596, the Spanish ship San Felipe set sail from Manila to Acapulco under captain Matías de Landecho with a cargo that was estimated to be worth over 1 million pesos. This relatively late departure of the Manila galleon meant San Felipe sailed during the Pacific typhoon season. After being hit by two typhoons, the captain decided to sail towards Japan to refit, but on the approach to the Japanese coast the galleon was hit by a third typhoon, leaving the ship without sails. Thanks to the Kuroshio current, the ship drifted towards Japan, a happenstance that the crew considered a miracle. They sighted land on the latitude of Kyoto, but could not land in the strong winds and drifted further. Amid fears of the uncontrollable ship crashing onto the rocks, San Felipe approached the coast of Tosa Province on Shikoku on October 19, 1596.
Having heard of Hideyoshi's hospitality to the friars, the captain felt safe enough to turn down a suggestion from his crew to make their way to the friendly port of Nagasaki, center of the Nanban trade. The local daimyo Chōsokabe Motochika, however, was unfriendly to the foreigners and forced the disabled ship to his home port of Urado (浦戸; in present-day Kōchi) with 200 armed boats. On arrival it wrecked on a sandbar. The Chōsokabe samurai then confiscated the remaining 600,000 pesos worth of cargo on board – the rest had already been lost in the stormy voyage. Chōsokabe Motochika claimed this was standard procedure, as it was his understanding of the Japanese maritime law that any vessel stranded or wrecked in Japan belonged, with its cargo, to the local authorities. He may also have been tempted by the cargo itself, since the Nanban trade and the wealth associated with it rarely reached Shikoku.
When the Spanish crew protested, Motochika suggested that they take their case to Hideyoshi, the de facto head of government, and seek help from his personal friend Mashita Nagamori, one of the five commissioners under Hideyoshi. Captain Landecho acted upon the advice and sent two of his officers to the capital Kyoto, with instructions that they should meet with Franciscan friars and avoid dealing with the Jesuits.
Chōsokabe Motochika's recommendation proved to be of dubious faith, as Mashita Nagamori saw profit to be made from the situation, and advised Hideyoshi to keep the cargo for the court treasury. The Jesuits caught wind of the matter and offered to intercede on behalf of the Spanish crew, suggesting the services of another of the five commissioners, the Christian sympathiser Maeda Gen'i; but the Franciscan commissary in Kyoto, Pedro Bautista, refused. By the time Maeda Gen'i was contacted, Mashita Nagamori was already on his way to the wreck and Maeda could do no more than to write a letter to his colleague urging leniency.
When Nagamori reached Tosa, he asked for a monetary bribe from the Spaniards; failing that, he set about loading San Felipe's freight onto a hundred Japanese boats to ship to Kyoto. While this was going on, Nagamori acquainted himself with the Spaniards, who entertained him with music and games and a show of fencing. He then asked Pilot Major Francisco de Olandia where they came from and how they came to Japan. At this point Olandia produced a map showing the extent of the Spanish colonial empire, and insinuated that Spain gained its empire by first converting native populations to Christianity with missionaries and then sending in conquistadors to join the newly converted in an invasion of conquest. Nagamori then inquired about the relationship between Spain and Portugal, and was indignant when the pilot and the ensign of the ship both replied that the two empires shared one king (the Jesuits had long explained to the Japanese that the two countries were different and separate).
This exchange was duly reported to Hideyoshi, who reacted with fury. The pilot's revelation was a confirmation of Hideyoshi's suspicions of Christians as "fifth columnists" in Japan, which had been fanned by his anti-Christian retainers. He responded quickly, ordering all the missionaries in Japan to be rounded up. Ishida Mitsunari, first among the five commissioners under Hideyoshi, clarified that Hideyoshi's order was directed towards the Franciscans that openly violated his 1587 edict – the Jesuits, who were discreet in their preaching, were excluded. In the end, 26 Catholics – six Franciscan friars, 17 Japanese Franciscan tertiaries, and three Japanese Jesuits included by mistake – were paraded from Kyoto to Nagasaki, where they were crucified on a hill on February 5, 1597. A passenger of San Felipe, the friar Philip of Jesus, was among the martyrs.