The British naval squadron based at Halifax was successful in deterring any American invasion, blocking American support for Nova Scotia rebels and launched some attacks on New England, such as the Battle of Machias (1777). However the Royal Navy was unable to establish naval supremacy. While many American privateers were captured in battles such as the Naval battle off Halifax, many more continued attacks on shipping and settlements until the final months of the war. The Royal Navy struggled to maintain British supply lines, defending convoys from American and in 1781, after the Franco-American alliance against Great Britain, French attacks such as a fiercely fought convoy battle, the a naval engagement with a French fleet at Sydney, Nova Scotia, near Spanish River, Cape Breton.