Fort Madison, on Nuku Hiva at Taioha'e Bay, was the first naval base of the United States in the Pacific Ocean. It was built by Commodore David Porter in October and November 1813, during the Anglo-American War, for protecting the village of Madisonville from British and Marquesan attacks. The fortification was named after President James Madison and armed with four cannons. Fort Madison was attacked only once, by British mutineers, in May 1814, and abandoned soon after.