During the First Spanish Period from 1565 to 1763, Florida served as a military defense port, and after Britain took control in 1763 agricultural commerce became important before Florida returned to Spain in 1783. Andrew Jackson's 1818 campaign against the Seminole Indians in North Florida helped the United States secure Florida from Spain in 1821 and pushed the Indians south, while the Second Seminole War from 1835 to 1842 forced the Indians out of Central Florida and the Florida Armed Occupation Act of 1842 opened the area to settlement. John Parsons, a New Hampshire war veteran, built a large house in 1852 that became a post office and general store, and he also constructed a causeway, a wharf, a custom house, and a light house. Working with David Levy Yulee, Parsons brought goods from Brooksville by wagon for shipment out of Bayport, after which they were carried by railroad from Cedar Key to Fernandina Beach, with cotton, produce, and timber as major exports. During the Civil War, Bayport exported salt and beef for Confederate troops and came under attack by Union forces, and it served as the Hernando County seat from 1854 to 1856. After the Civil War, Bayport was largely rebuilt. In 1866 the Eberhard Faber Pencil Company of New York acquired 40 acres in Bayport, and cedar trees were cut and floated down the Weeki Wachee River to Bayport for shipment to Cedar Key. Bayport remained a major export port until 1885, when Brooksville gained its first railroad spur, and by then the area had appeared in nationally circulated travel guides and had become a popular destination for fishermen, boaters, and sportsmen. After John Parsons died in 1888, his home became the Bayport Hotel, and for many years after 1909 Frances Goethe managed it while she and her son Henry also ran a commercial fishing operation that shipped fish from Bayport to Centralia, a nearby lumber town with a railroad spur to Brooksville. The hotel ceased operations and burned in 1942. During Prohibition, Bayport's remote location fostered bootlegging operations, and during World War II a radar installation there was used for bombing practice by planes from MacDill Air Force Base while a former bird rack rookery used to collect cormorant dung for fertilizer was used for target practice by the Army Air Corps.