As contemplated by the Treaty of Alliance, Spain allied with France against Britain through the Treaty of Aranjuez on April 12, 1779. The Franco-Spanish siege on Gibraltar, though ultimately unsuccessful, served to sap British manpower and war material from North America. The Dutch Republic joined the conflict the following year, when Britain declared war after seizing a Dutch merchant ship alleged to be carrying contraband to France. Although the Dutch did not formally ally with the United States, their role as co-belligerents with France further occupied British forces, particularly in the Caribbean and the Indian Ocean. The Dutch Republic also became the second nation to officially recognized U.S. independence, in 1782, and concluded its own commercial and navigation treaty with America.