The American Revolutionary War , which ended with the recognition of independence of the United States from the Kingdom of Great Britain , was the first successful war of independence against a European colonial empire .