In some rare cases, such as with Ethiopia and Qing Dynasty China, the local governments were able to use the treaties to at least mitigate the impact of European colonization. Both Ethiopia and Qing Dynasty China learned the intricacies of European diplomatic customs to mitigate what through treaties