The Pennsylvania Navy (more formally known as the Pennsylvania State Navy or in modern terms the Pennsylvania Naval Militia) served as the naval force of Pennsylvania during the American Revolution and afterward, until the formation of the United States Navy. The navy's vessels served almost exclusively on the Delaware River, and were active (in conjunction with ships of the Continental Navy) in first defending the approaches to the city of Philadelphia during the British campaign that successfully occupied the city in 1777, and then preventing (at least for a time) the Royal Navy from resupplying the occupying army.