On 25 July, 1609, the Manila galleons "San Francisco", "Santa Ana", and the flagship ("almiranta") "San Antonio" set sail from Cavite, then a major Philippine shipyard during the sixteenth and seventeenth centuries, towards Acapulco. The ships ran into storms on 10 August around the Islas de los Ladrones (present-day Northern Mariana Islands); only the "San Antonio" managed to successfully reach Acapulco, while the "Santa Ana" was almost entirely destroyed and had to land at Bungo Province (present-day Ōita Prefecture). The "San Francisco" was severely damaged, losing its mast and leaking water, and later struck a reef nearby the hamlet Yubanda (likely present-day Iwawada, in Onjuku, Chiba). Fifty-six sailors drowned; the rest survived by clinging to floating wreckage. Upon getting to land, a few sailors found some locals from Yubanda at a nearby rice paddy field, who took the survivors to their hamlet. The captain of the "San Francisco", Rodrigo de Vivero, was recognized as a former governor of the Philippines, and was granted an audience with the retired "shōgun" Tokugawa Ieyasu. de Vivero drafted a treaty, signed on 29 November 1609, whereby the Spaniards could establish a factory in eastern Japan, mining specialists would be imported from New Spain, Spanish ships would be allowed to visit Japan in case of necessity, and a Japanese embassy would be sent to the Spanish court.