During the American Revolution , it was briefly the capital of the colonies on September 27 , 1777 , when the Continental Congress fled Philadelphia , which had been captured by the British .
When the British captured Philadelphia in the American Revolution , Lancaster became the capital of the colonies on September 27 , 1777 .