During the heart of the revolutionary war, the British troops advanced south trying to take over the capital city of Philadelphia. George Washington led his men into the battle of Brandywine. After being flanked, the troops retreated, and Philadelphia fell under British control. The continental congress decided to move the capital 60 miles west to Lancaster. They met in the Lancaster courthouse. On September 27, 1777, Lancaster became the capital of the United States. During the one day as capital, congress elected Ben Franklin a commissioner to negotiate a treaty with France.
This was the revolutionary war, and the British knew capturing the capital city of Philadelphia would help drastically in ending the war. After the battle was over, congress moved to Lancaster in hopes of lasting there a few days. But the British advanced quickly and the U.S. congress was forced to move to York. They remained in York until March of 1781. This is important because it was the 3rd capital in the history of the entire United States, behind Philadelphia, and briefly Baltimore.