The Pensacola and Atlantic Railroad (P&A) was incorporated by an act of the Florida Legislature on March 4, 1881, Acts of the Florida Legislature, 1881, chapter 3335 to run from Pensacola to the Apalachicola River near Chattahoochee, a distance of about 160 miles .